• Resolved NaamaGold

    (@naamagold)


    Hi

    I am writing my first plugin for my site and i was wondering if you could help me to work out the best way to achieve what I need.

    I want to store one date for all posts associated with a post-type in a way that I can update that date in one place and it will update on each post of that post-type.

    I thought of using custom fields but then it would not update all the posts at the same time but individually.

    I thought of creating a global variable that would store this information and be able to have an update button in a plugin and then on each post it would draw from that variable.

    The question is, what is the correct way to create the variable so it would be available between sessions? Do I need to create a new database for this? Can I add a new field in the post-type database? Does a global variable hold its info between sessions?

    Thanks so much for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘storing one piece of data for whole post-type’ is closed to new replies.