WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Of course there is a Drafts section in Post and Pages, but how would I make an Archive section - which would contain previously published posts and page?

share|improve this question
Which criteria do you use to check if a post should be in the archives or not? Perhaps you can try using a category if you want to decide it on your own for each post... – Sven May 23 '13 at 14:57
well, the user would change the status to 'published' to 'archived', and then it would not appear to visitors – cannyboy May 23 '13 at 15:00

You can add a custom post status via register_post_status, but I'll warn you now that the API only half exists for this. You won't see any UI to allow you to set this status, you'll have to provide your own via a custom meta box, and you won't see anything on the back-end to allow you to filter on this status until you've assigned the status to a post.

share|improve this answer

It's not quite easy to deal with register_post_status yet, as it's not meant to be used within themes or plugins, but there is a nice plugin called Edit Flow which will do the job. Use the interface within the plugin to register your new post status and it will automatically appear in the dropdown menu beside your post.

Post Status

You'll get the current status of the blogpost via get_post_status:

   if ( get_post_status ( $ID ) == 'archived' )
      echo 'archived';
      echo 'public';
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.