Support » Miscellaneous » new post id

new post id

  • Hi.
    In a plugin, I’ve added the action
    add_action ('post-new.php', 'set_custom_fields_for_new_posts');
    so when the user tries to create a new post, I add it some custom fields.
    The problem is that the function add_post_meta takes the post_id parameter and a new post has no id before saving it.
    Any suggestion?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘new post id’ is closed to new replies.
Skip to toolbar