0
votes

I have a requirement in wordpress that I want an option in custom post so user could set the future post publish date & time using a custom field & the post automatically sets for the set date to be published .

So I have few questions in my mind 1 which data base table & field does WP stores this date & time .

  1. how can I implement this any idea would be highly appreciable.

3.right now I have to use the usual way near the publish button to set future post but for user I want it simply as custom field value .

1

1 Answers

0
votes
  1. The post date is stored in wp_posts table with column name 'post_date'.
  2. Here is an idea on how you can implement it (psuedocode):

    Implement the meta box as an date field (HTML5 or JQuery)
    Add an action hook to 'save_post'
    In the function, get the saved date from the custom field and update the current post's date using wp_update_post() method.

Hope this helps