0
votes

I just have a question regarding storing of meta data on wp_postmeta in wordpress.
I already understand how to store data on the table, by using add_post_meta() and to get the data by using get_post_meta().. Basically I store meta key by using underscore and a string. example "_this_varible". and I store meta value using any data from metabox.

My question are:
1.) Is there a problem if I do not store meta keys variable with underscore? for example _this_variable ?
2.) Is it ok if I store dates on the meta_key? I'm still confused on this part.
3.) I was thinking on storing multiple meta data on wp_postmeta with the same post_id. Is there's no problem with it?

1

1 Answers

0
votes
  1. start meta key with a underscore if you want to use a custom meta box for the input of the value -- it wont appear in the custom field box
  2. you can store dates in the meta value....why would you want to make this a key? keys should be common to posts so you can pull reliably.
  3. as many as you want!