I have a category with about 3.500 posts. 2.500 are not published, but saved as drafts.
I want to unpublish all the remaining 1000 posts from this one category.
Maybe I will want to delete all of the posts later on.
How can I do this?
I have a category with about 3.500 posts. 2.500 are not published, but saved as drafts.
I want to unpublish all the remaining 1000 posts from this one category.
Maybe I will want to delete all of the posts later on.
How can I do this?
You must be logged in to post a comment.
You need to get the published posts in the category then run
wp_update_post()
inserting the new status. Here is a quick function. I am attaching it to admin init. I would also turn it off after your statuses are updated.