WordPress.org

Ready to get started?Download WordPress

Forums

Change post / page status (1 post)

  1. tmelbs
    Member
    Posted 3 years ago #

    Hello,

    I am trying to figure out how to write the code that will allow me to do the following with pages of a WordPress blog?

    "To change a post status, you get the post, change its status field, then call wp_update_post with the new post object"

    Basically I want to be able to list a specific page (in a wp admin options page I will create) and then allow the user to update the status of that page from draft to publish and back from publish to draft.

    Thank you

Topic Closed

This topic has been closed to new replies.

About this Topic