1
vote
2answers
6k views

How to update page status from publish to draft and draft to publish

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 ...