How To's

How to add custom post status for blog posts in WordPress?

Do you run a multi-author blog on WordPress? If your answer is yes then it would be great to change the editorial status of your posts in your dashboard. Post status is an editorial tool. It allows you to organize your articles based on their respective stages during the editorial workflow.

For example,

Posts that are incomplete are saved with the post status labeled “Draft”. When you publish an article, the status changes to “Published.”

custom post status published wordpress

WordPress offers the following post status that you can use:

Drafts: Incomplete posts viewable by anyone with proper user level

Future: Scheduled posts to be published on a future date

Auto-Draft: Revisions that WordPress saves automatically while you are editing

Pending: Awaiting approval from another user to publish

Published: Live posts on your blog that are viewable by everyone

Private: Posts that are viewable only to WordPress users at Administration level

Trash: Deleted posts. You can empty the trash and delete them permanently

For some bloggers, the above-mentioned options are enough. If you have a more specific or complicated workflow then you may need to customize the options.

You can create your own custom post statuses to improve your editorial workflow. For example, you can add “Not suitable” post status for the articles which are complete but not suitable for publication.

In this article, you will learn how you can create your own custom post status, both with a dedicated plugin and manually:

1. Create Custom Post Status using a plugin

The very first step is to install and activate the Edit Flow plugin. After the activation, you will see a new menu in the WordPress admin menu labeled as “Edit Flow”. Click on it to get access to plugin’s settings page.

edit custom post status plugin wordpress

Edit Flow offers many amazing features. You can turn it on-off as per your requirement. Now click on “Edit Statuses” button under “Custom Statuses” box.

Edit Flow creates some of the custom post statuses automatically:

Pitch: Ideas for posts pitched to you by a writer

Assigned: You can select an author and mark an article as assigned. The author will work on the assigned article.

In Progress: Writer is working on the post but is not yet available as a readable draft.

add new custom post status

You can create your own custom status by providing a name and description in the left column. After adding information, click on the “Add new status” button to save the changes.

The custom status will appear in the right column. You can edit it or delete it any time.

edit custom post status

To check, go to posts and click on “Add new” page to create a new post. Click on the “Edit” link next to the status option.

select custom post status

You will be able to see all post statuses including the custom status post you just created. To see all articles according to post status go to “Posts” and click on “All posts”.

all posts sort by post status

2. Create Custom Post Status using code

WordPress does have a built-in function for adding custom post statuses, but it is not an ideal solution. You can create a custom post status in functions.php using the “register_post_status” function. It will not show up in the drop-down menus in the admin panel when you’re creating or editing a post.

In this method, you have to add code to your WordPress site. Add the following code to your theme’s functions.php file or a site-specific plugin:

custom post status code

In this code example, “Rejected” option is displayed. You can select your own specific option and replace it with “Rejected” term.

The code registers a custom post status. It uses jQuery to add it to the admin panel. You can edit a WordPress post. Custom post status added by you will be visible in the status drop-down menu.

custom post status example

WordPress already offers good post statuses. All statuses are sufficient for most of the users. Custom post statuses can be useful for very organized bloggers to get more flexibility in options. We hope that this article will be useful for you when you want to add custom post status.

Tags

Leave a Reply

Your email address will not be published. Required fields are marked *

Close