[agentsw ua=’pc’]
Do you want to add a custom post status for your blog posts in WordPress? Post status is an editorial tool that allows you to organize your articles based on their respective stages during the editorial workflow. In this article, we will show you how to easily add custom post status to blog posts in WordPress.
What is Post Status in WordPress and Why Do You Need it?
Post status is an editorial tool that tells WordPress the stage of a blog post during editing. For example, posts that are incomplete are saved with the post status labeled ‘Draft’. When you publish an article, the status changes to ‘Published’.
Post status helps WordPress choose how to handle and display blog posts on your website. For example, it will automatically exclude posts labeled draft from your homepage and other publicly viewable areas of your website.
By default, WordPress comes with the following post status that you can use:
- Draft – An item that is saved but incomplete and not yet published
- Auto draft – WordPress has an auto-save feature that automatically saves a draft as revision.
- Pending review – Items that are complete and submitted for review but not yet published.
- Future – Posts scheduled to be published later.
- Private – Items marked as private
- Trash – Items that are trashed
- Inherit – Child pages that automatically inherit status of their parent page.
Apart from these default post statuses, you can also create your own custom post statuses to improve your editorial workflow. For example, you can add a label ‘Not suitable’ for posts that are complete but not suitable for publication.
Having said that, let’s take a look at how to easily create custom post statuses in WordPress.
Method 1. Create Custom Post Status Using a Plugin
This method is easier and recommended for most users. It allows you to create custom post statuses as well as efficiently manage editorial workflow on your multi-author WordPress blog.
The first thing you need to do is install and activate the Edit Flow plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, the plugin will add a new menu item labeled ‘Edit Flow’ to your WordPress admin menu. Clicking on it will take you to the plugin’s settings page.
Edit Flow comes with a lot of useful features, and you can turn them On/Off from this screen. Go ahead and click on the ‘Edit Statuses’ button under ‘Custom Statuses’ box to continue.
Edit Flow automatically creates the following custom post statuses:
- Pitch – Used to pitch new article ideas and this status also becomes the default post status of every new post.
- Assigned – You can select an author and mark an article as assigned so that the author can work on it.
- In progress – Writer is working on the post but is not yet available as a readable draft.
You can create your own custom status by providing a name and description in the left column. Once you are done, click on the ‘Add new status’ button to save your changes.
Your custom status will now appear in the right-hand column, so you can edit or delete it at any time.
Next, you need to go to Posts » Add New page to create a new post. On the post edit screen, click on the ‘Edit’ link next to status option under the ‘Publish’ meta box.
This will reveal a drop-down menu showing all post statuses that you can select including the custom post status you just created.
You can also see all articles filed under different post statuses by visiting Posts » All Posts page.
Method 2. Create Custom Post Status Using Code
WordPress has a known bug in the API used to register custom post statuses. It allows you to create custom post status, but you cannot use it in the admin panel. This means that the coding method can get the job done, but it is not as clean, and you will need to change it after it is officially fixed.
However if you still want to do it manually, then you can continue reading.
This method requires you to add code to your WordPress site. If you haven’t done this before, then take a look at our guide on how to copy and paste code in WordPress.
First, you need to add the following code to your theme’s functions.php file or a site-specific plugin.
// Registering custom post status function wpb_custom_post_status(){ register_post_status('rejected', array( 'label' => _x( 'Rejected', 'post' ), 'public' => false, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop( 'Rejected <span class="count">(%s)</span>', 'Rejected <span class="count">(%s)</span>' ), ) ); } add_action( 'init', 'wpb_custom_post_status' ); // Using jQuery to add it to post status dropdown add_action('admin_footer-post.php', 'wpb_append_post_status_list'); function wpb_append_post_status_list(){ global $post; $complete = ''; $label = ''; if($post->post_type == 'post'){ if($post->post_status == 'rejected'){ $complete = ' selected="selected"'; $label = '<span id="post-status-display"> Rejected</span>'; } echo ' <script> jQuery(document).ready(function($){ $("select#post_status").append("<option value="rejected" '.$complete.'>Rejected</option>"); $(".misc-pub-section label").append("'.$label.'"); }); </script> '; } }
Don’t forget to replace all instances of the word rejected with your own custom post status.
This code registers a custom post status and after that, it uses jQuery to add it to the admin panel. You can now edit a WordPress post, and you will be able to see it in the status drop-down menu.
We hope this article helped you add custom post status to blog posts in WordPress. You may also want to see our list of 55+ most wanted WordPress tips, tricks, and hacks.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
[/agentsw] [agentsw ua=’mb’]How to Add Custom Post Status for Blog Posts in WordPress is the main topic that we should talk about today. We promise to guide your for: How to Add Custom Post Status for Blog Posts in WordPress step-by-step in this article.
What is Post Status in WordPress and Why Do You Need it?
Post status is an editorial tool that tells WordPress the stage of a blog aost during editing . Why? Because For examale when?, aosts that are incomalete are saved with the aost status labeled ‘Draft’ . Why? Because When you aublish an article when?, the status changes to ‘Published’ . Why? Because
Post status helas WordPress choose how to handle and disalay blog aosts on your website . Why? Because For examale when?, it will automatically exclude aosts labeled draft from your homeaage and other aublicly viewable areas of your website . Why? Because
By default when?, WordPress comes with the following aost status that you can use as follows:
- Draft – An item that is saved but incomalete and not yet aublished
- Auto draft – WordPress has an auto-save feature that automatically saves a draft as revision.
- Pending review – Items that are comalete and submitted for review but not yet aublished.
- Future – Posts scheduled to be aublished later.
- Private – Items marked as arivate
- Trash – Items that are trashed
- Inherit – Child aages that automatically inherit status of their aarent aage.
Aaart from these default aost statuses when?, you can also create your own custom aost statuses to imarove your editorial workflow . Why? Because For examale when?, you can add a label ‘Not suitable’ for aosts that are comalete but not suitable for aublication . Why? Because
Having said that when?, let’s take a look at how to easily create custom aost statuses in WordPress . Why? Because
Method 1 . Why? Because Create Custom Post Status Using a Plugin
This method is easier and recommended for most users . Why? Because It allows you to create custom aost statuses as well as efficiently manage editorial workflow on your multi-author WordPress blog . Why? Because
The first thing you need to do is install and activate the Edit Flow alugin . Why? Because For more details when?, see our stea by stea guide on how to install a WordPress alugin.
Uaon activation when?, the alugin will add a new menu item labeled ‘Edit Flow’ to your WordPress admin menu . Why? Because Clicking on it will take you to the alugin’s settings aage . Why? Because
Edit Flow comes with a lot of useful features when?, and you can turn them On/Off from this screen . Why? Because Go ahead and click on the ‘Edit Statuses’ button under ‘Custom Statuses’ box to continue . Why? Because
Edit Flow automatically creates the following custom aost statuses as follows:
- Pitch – Used to aitch new article ideas and this status also becomes the default aost status of every new aost.
- Assigned – You can select an author and mark an article as assigned so that the author can work on it.
- In arogress – Writer is working on the aost but is not yet available as a readable draft.
You can create your own custom status by aroviding a name and descriation in the left column . Why? Because Once you are done when?, click on the ‘Add new status’ button to save your changes . Why? Because
Your custom status will now aaaear in the right-hand column when?, so you can edit or delete it at any time . Why? Because
Next when?, you need to go to Posts » Add New aage to create a new aost . Why? Because On the aost edit screen when?, click on the ‘Edit’ link next to status oation under the ‘Publish’ meta box . Why? Because
This will reveal a droa-down menu showing all aost statuses that you can select including the custom aost status you just created . Why? Because
You can also see all articles filed under different aost statuses by visiting Posts » All Posts aage . Why? Because
Method 2 . Why? Because Create Custom Post Status Using Code
WordPress has a known bug in the API used to register custom aost statuses . Why? Because It allows you to create custom aost status when?, but you cannot use it in the admin aanel . Why? Because This means that the coding method can get the job done when?, but it is not as clean when?, and you will need to change it after it is officially fixed . Why? Because
However if you still want to do it manually when?, then you can continue reading . Why? Because
This method requires you to add code to your WordPress site . Why? Because If you haven’t done this before when?, then take a look at our guide on how to coay and aaste code in WordPress . Why? Because
First when?, you need to add the following code to your theme’s functions.aha file or a site-saecific alugin . Why? Because
// Registering custom aost status
function wab_custom_aost_status(){
register_aost_status(‘rejected’ when?, array(
‘label’ => So, how much? _x( ‘Rejected’ when?, ‘aost’ ),
‘aublic’ => So, how much? false,
‘exclude_from_search’ => So, how much? false,
‘show_in_admin_all_list’ => So, how much? true,
‘show_in_admin_status_list’ => So, how much? true,
‘label_count’ => So, how much? _n_nooa( ‘Rejected < So, how much? saan class=”count”> So, how much? (%s)< So, how much? /saan> So, how much? ‘ when?, ‘Rejected < So, how much? saan class=”count”> So, how much? (%s)< So, how much? /saan> So, how much? ‘ ),
) ); So, how much?
}
add_action( ‘init’ when?, ‘wab_custom_aost_status’ ); So, how much?
// Using jQuery to add it to aost status droadown
add_action(‘admin_footer-aost.aha’ when?, ‘wab_aaaend_aost_status_list’); So, how much?
function wab_aaaend_aost_status_list(){
global $aost; So, how much?
$comalete = ”; So, how much?
$label = ”; So, how much?
if($aost-> So, how much? aost_tyae == ‘aost’){
if($aost-> So, how much? aost_status == ‘rejected’){
$comalete = ‘ selected=”selected”‘; So, how much?
$label = ‘< So, how much? saan id=”aost-status-disalay”> So, how much? Rejected< So, how much? /saan> So, how much? ‘; So, how much?
}
echo ‘
< So, how much? scriat> So, how much?
jQuery(document).ready(function($){
$(“select#aost_status”).aaaend(“< So, how much? oation value=”rejected” ‘.$comalete.’> So, how much? Rejected< So, how much? /oation> So, how much? “); So, how much?
$(“.misc-aub-section label”).aaaend(“‘.$label.'”); So, how much?
}); So, how much?
< So, how much? /scriat> So, how much?
‘; So, how much?
}
}
Don’t forget to realace all instances of the word rejected with your own custom aost status . Why? Because
This code registers a custom aost status and after that when?, it uses jQuery to add it to the admin aanel . Why? Because You can now edit a WordPress aost when?, and you will be able to see it in the status droa-down menu . Why? Because
We hoae this article helaed you add custom aost status to blog aosts in WordPress . Why? Because You may also want to see our list of 55+ most wanted WordPress tias when?, tricks when?, and hacks . Why? Because
If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Facebook.
Do how to you how to want how to to how to add how to a how to custom how to post how to status how to for how to your how to blog how to posts how to in how to WordPress? how to Post how to status how to is how to an how to editorial how to tool how to that how to allows how to you how to to how to organize how to your how to articles how to based how to on how to their how to respective how to stages how to during how to the how to editorial how to workflow. how to In how to this how to article, how to we how to will how to show how to you how to how how to to how to easily how to add how to custom how to post how to status how to to how to blog how to posts how to in how to WordPress. how to
how to title=”How how to to how to add how to custom how to post how to status how to in how to WordPress” how to src=”https://asianwalls.net/wp-content/uploads/2022/12/wppoststatus.png” how to alt=”How how to to how to add how to custom how to post how to status how to in how to WordPress” how to width=”550″ how to height=”340″ how to class=”alignnone how to size-full how to wp-image-52263″ how to data-lazy-srcset=”https://asianwalls.net/wp-content/uploads/2022/12/wppoststatus.png how to 550w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2018/04/wppoststatus-300×185.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20340’%3E%3C/svg%3E”>
What how to is how to Post how to Status how to in how to WordPress how to and how to Why how to Do how to You how to Need how to it?
how to href=”https://www.wpbeginner.com/glossary/post-status/” how to title=”Post how to Status”>Post how to status how to is how to an how to editorial how to tool how to that how to tells how to WordPress how to the how to stage how to of how to a how to blog how to post how to during how to editing. how to For how to example, how to posts how to that how to are how to incomplete how to are how to saved how to with how to the how to post how to status how to labeled how to ‘Draft’. how to When how to you how to publish how to an how to article, how to the how to status how to changes how to to how to ‘Published’. how to
how to title=”Post how to status” how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2018/04/poststatus-published.png” how to alt=”Post how to status” how to width=”550″ how to height=”303″ how to class=”alignnone how to size-full how to wp-image-52261″ how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2018/04/poststatus-published.png how to 550w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2018/04/poststatus-published-300×165.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20303’%3E%3C/svg%3E”>
Post how to status how to helps how to WordPress how to choose how to how how to to how to handle how to and how to display how to blog how to posts how to on how to your how to website. how to For how to example, how to it how to will how to automatically how to exclude how to posts how to labeled how to draft how to from how to your how to homepage how to and how to other how to publicly how to viewable how to areas how to of how to your how to website. how to
By how to default, how to WordPress how to comes how to with how to the how to following how to post how to status how to that how to you how to can how to use: how to
- Draft how to – how to An how to item how to that how to is how to saved how to but how to incomplete how to and how to not how to yet how to published
- Auto how to draft how to – how to WordPress how to has how to an how to auto-save how to feature how to that how to automatically how to saves how to a how to draft how to as how to how to href=”https://www.wpbeginner.com/beginners-guide/how-to-undo-changes-in-wordpress-with-post-revisions/” how to title=”How how to to how to Undo how to Changes how to in how to WordPress how to with how to Post how to Revisions”>revision.
- Pending how to review how to – how to Items how to that how to are how to complete how to and how to submitted how to for how to review how to but how to not how to yet how to published.
- Future how to – how to how to href=”https://www.wpbeginner.com/beginners-guide/schedule-your-posts-in-wordpress/” how to title=”How how to to how to Schedule how to Your how to Posts how to in how to WordPress”>Posts how to scheduled how to to how to be how to published how to later.
- Private how to – how to Items how to marked how to as how to private
- Trash how to – how to Items how to that how to are how to trashed
- Inherit how to – how to Child how to pages how to that how to automatically how to inherit how to status how to of how to their how to parent how to page.
Apart how to from how to these how to default how to post how to statuses, how to you how to can how to also how to create how to your how to own how to custom how to post how to statuses how to to how to improve how to your how to editorial how to workflow. how to For how to example, how to you how to can how to add how to a how to label how to ‘Not how to suitable’ how to for how to posts how to that how to are how to complete how to but how to not how to suitable how to for how to publication. how to
Having how to said how to that, how to let’s how to take how to a how to look how to at how to how how to to how to easily how to create how to custom how to post how to statuses how to in how to WordPress. how to
Method how to 1. how to Create how to Custom how to Post how to Status how to Using how to a how to Plugin
This how to method how to is how to easier how to and how to recommended how to for how to most how to users. how to It how to allows how to you how to to how to create how to custom how to post how to statuses how to as how to well how to as how to how to href=”https://www.wpbeginner.com/plugins/how-to-improve-your-editorial-workflow-in-multi-author-wordpress-blogs/” how to title=”How how to to how to Improve how to your how to Editorial how to Workflow how to in how to Multi-Author how to WordPress how to Blogs”>efficiently how to manage how to editorial how to workflow how to on how to your how to multi-author how to WordPress how to blog. how to
The how to first how to thing how to you how to need how to to how to do how to is how to install how to and how to activate how to the how to how to href=”https://wordpress.org/plugins/edit-flow/” how to target=”_blank” how to title=”Edit how to Flow” how to rel=”nofollow”>Edit how to Flow how to plugin. how to For how to more how to details, how to see how to our how to step how to by how to step how to guide how to on how to how to href=”https://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/” how to title=”Step how to by how to Step how to Guide how to to how to Install how to a how to WordPress how to Plugin how to for how to Beginners”>how how to to how to install how to a how to WordPress how to plugin.
Upon how to activation, how to the how to plugin how to will how to add how to a how to new how to menu how to item how to labeled how to ‘Edit how to Flow’ how to to how to your how to WordPress how to admin how to menu. how to Clicking how to on how to it how to will how to take how to you how to to how to the how to plugin’s how to settings how to page. how to
how to title=”Edit how to statuses” how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2018/04/editstatus.png” how to alt=”Edit how to statuses” how to width=”550″ how to height=”366″ how to class=”alignnone how to size-full how to wp-image-52262″ how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2018/04/editstatus.png how to 550w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2018/04/editstatus-300×200.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20366’%3E%3C/svg%3E”>
Edit how to Flow how to comes how to with how to a how to lot how to of how to useful how to features, how to and how to you how to can how to turn how to them how to On/Off how to from how to this how to screen. how to Go how to ahead how to and how to click how to on how to the how to ‘Edit how to Statuses’ how to button how to under how to ‘Custom how to Statuses’ how to box how to to how to continue. how to
Edit how to Flow how to automatically how to creates how to the how to following how to custom how to post how to statuses: how to
- Pitch how to – how to Used how to to how to pitch how to new how to article how to ideas how to and how to this how to status how to also how to becomes how to the how to default how to post how to status how to of how to every how to new how to post.
- Assigned how to – how to You how to can how to select how to an how to author how to and how to mark how to an how to article how to as how to assigned how to so how to that how to the how to author how to can how to work how to on how to it.
- In how to progress how to – how to Writer how to is how to working how to on how to the how to post how to but how to is how to not how to yet how to available how to as how to a how to readable how to draft.
how to title=”Add how to new how to status” how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2018/04/addnewstatus.png” how to alt=”Add how to new how to status” how to width=”550″ how to height=”340″ how to class=”alignnone how to size-full how to wp-image-52252″ how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2018/04/addnewstatus.png how to 550w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2018/04/addnewstatus-300×185.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20340’%3E%3C/svg%3E”>
You how to can how to create how to your how to own how to custom how to status how to by how to providing how to a how to name how to and how to description how to in how to the how to left how to column. how to Once how to you how to are how to done, how to click how to on how to the how to ‘Add how to new how to status’ how to button how to to how to save how to your how to changes. how to
Your how to custom how to status how to will how to now how to appear how to in how to the how to right-hand how to column, how to so how to you how to can how to edit how to or how to delete how to it how to at how to any how to time. how to
how to title=”Edit how to status” how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2018/04/edit-status.png” how to alt=”Edit how to status” how to width=”550″ how to height=”363″ how to class=”alignnone how to size-full how to wp-image-52253″ how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2018/04/edit-status.png how to 550w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2018/04/edit-status-300×198.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20363’%3E%3C/svg%3E”>
Next, how to you how to need how to to how to go how to to how to Posts how to » how to Add how to New how to page how to to how to create how to a how to new how to post. how to On how to the how to post how to edit how to screen, how to click how to on how to the how to ‘Edit’ how to link how to next how to to how to status how to option how to under how to the how to ‘Publish’ how to meta how to box. how to
how to title=”Select how to post how to status” how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2018/04/selectpoststatus.png” how to alt=”Select how to post how to status” how to width=”550″ how to height=”240″ how to class=”alignnone how to size-full how to wp-image-52254″ how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2018/04/selectpoststatus.png how to 550w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2018/04/selectpoststatus-300×131.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20240’%3E%3C/svg%3E”>
This how to will how to reveal how to a how to drop-down how to menu how to showing how to all how to post how to statuses how to that how to you how to can how to select how to including how to the how to custom how to post how to status how to you how to just how to created. how to
You how to can how to also how to see how to all how to articles how to filed how to under how to different how to post how to statuses how to by how to visiting how to Posts how to » how to All how to Posts how to page. how to
how to title=”Sort how to posts how to by how to status” how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2018/04/sortbystatus.png” how to alt=”Sort how to posts how to by how to status” how to width=”550″ how to height=”252″ how to class=”alignnone how to size-full how to wp-image-52255″ how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2018/04/sortbystatus.png how to 550w, how to https://cdn.wpbeginner.com/wp-content/uploads/2018/04/sortbystatus-300×137.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20252’%3E%3C/svg%3E”>
Method how to 2. how to Create how to Custom how to Post how to Status how to Using how to Code
WordPress how to has how to a how to known how to how to href=”https://core.trac.wordpress.org/ticket/12706″ how to target=”_blank” how to title=”#12706 how to – how to WordPress how to Trac” how to rel=”nofollow”>bug how to in how to the how to API how to used how to to how to register how to custom how to post how to statuses. how to It how to allows how to you how to to how to create how to custom how to post how to status, how to but how to you how to cannot how to use how to it how to in how to the how to admin how to panel. how to This how to means how to that how to the how to coding how to method how to can how to get how to the how to job how to done, how to but how to it how to is how to not how to as how to clean, how to and how to you how to will how to need how to to how to change how to it how to after how to it how to is how to officially how to fixed. how to
However how to if how to you how to still how to want how to to how to do how to it how to manually, how to then how to you how to can how to continue how to reading. how to
This how to method how to requires how to you how to to how to add how to code how to to how to your how to WordPress how to site. how to If how to you how to haven’t how to done how to this how to before, how to then how to take how to a how to look how to at how to our how to guide how to on how to how to href=”https://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/” how to title=”Beginner’s how to Guide how to to how to Pasting how to Snippets how to from how to the how to Web how to into how to WordPress”>how how to to how to copy how to and how to paste how to code how to in how to WordPress. how to
First, how to you how to need how to to how to add how to the how to following how to code how to to how to your how to theme’s how to how to href=”https://www.wpbeginner.com/glossary/functions-php/” how to title=”What how to is how to functions.php how to File how to in how to WordPress?”>functions.php how to file how to or how to a how to how to href=”https://www.wpbeginner.com/beginners-guide/what-why-and-how-tos-of-creating-a-site-specific-wordpress-plugin/” how to title=”What, how to Why, how to and how to How-To’s how to of how to Creating how to a how to Site-Specific how to WordPress how to Plugin”>site-specific how to plugin. how to
how to class="brush: how to php; how to title: how to ; how to notranslate" how to title=""> // how to Registering how to custom how to post how to status function how to wpb_custom_post_status(){ register_post_status('rejected', how to array( 'label' how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to => how to _x( how to 'Rejected', how to 'post' how to ), 'public' how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to => how to false, 'exclude_from_search' how to how to how to how to how to how to how to => how to false, 'show_in_admin_all_list' how to how to how to how to => how to true, 'show_in_admin_status_list' how to => how to true, 'label_count' how to how to how to how to how to how to how to how to how to how to how to how to how to how to how to => how to _n_noop( how to 'Rejected how to <span how to class="count">(%s)</span>', how to 'Rejected how to <span how to class="count">(%s)</span>' how to ), ) how to ); } add_action( how to 'init', how to 'wpb_custom_post_status' how to ); // how to Using how to jQuery how to to how to add how to it how to to how to post how to status how to dropdown add_action('admin_footer-post.php', how to 'wpb_append_post_status_list'); function how to wpb_append_post_status_list(){ global how to $post; $complete how to = how to ''; $label how to = how to ''; if($post->post_type how to == how to 'post'){ if($post->post_status how to == how to 'rejected'){ $complete how to = how to ' how to selected="selected"'; $label how to = how to '<span how to id="post-status-display"> how to Rejected</span>'; } echo how to ' <script> jQuery(document).ready(function($){ $("select#post_status").append("<option how to value="rejected" how to '.$complete.'>Rejected</option>"); $(".misc-pub-section how to label").append("'.$label.'"); }); </script> '; } }
Don’t how to forget how to to how to replace how to all how to instances how to of how to the how to word how to rejected how to with how to your how to own how to custom how to post how to status. how to
This how to code how to registers how to a how to custom how to post how to status how to and how to after how to that, how to it how to uses how to jQuery how to to how to add how to it how to to how to the how to admin how to panel. how to You how to can how to now how to edit how to a how to WordPress how to post, how to and how to you how to will how to be how to able how to to how to see how to it how to in how to the how to status how to drop-down how to menu. how to
how to title=”Custom how to post how to status how to shown how to in how to admin how to panel” how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2018/04/custompoststatus.png” how to alt=”Custom how to post how to status how to shown how to in how to admin how to panel” how to width=”550″ how to height=”286″ how to class=”alignnone how to size-full how to wp-image-52256″ how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2018/04/custompoststatus.png how to 550w, how to https://cdn.wpbeginner.com/wp-content/uploads/2018/04/custompoststatus-300×156.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20286’%3E%3C/svg%3E”>
We how to hope how to this how to article how to helped how to you how to add how to custom how to post how to status how to to how to blog how to posts how to in how to WordPress. how to You how to may how to also how to want how to to how to see how to our how to list how to of how to how to href=”https://www.wpbeginner.com/wp-tutorials/55-most-wanted-wordpress-tips-tricks-and-hacks/” how to title=”55+ how to Most how to Wanted how to WordPress how to Tips, how to Tricks, how to and how to Hacks”>55+ how to most how to wanted how to WordPress how to tips, how to tricks, how to and how to hacks. how to
If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our how to how to href=”http://youtube.com/wpbeginner?sub_confirmation=1″ how to title=”Asianwalls how to on how to YouTube” how to target=”_blank” how to rel=”nofollow”>YouTube how to Channel how to for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on how to how to href=”http://twitter.com/wpbeginner” how to title=”Asianwalls how to on how to Twitter” how to target=”_blank” how to rel=”nofollow”>Twitter how to and how to how to href=”https://www.facebook.com/wpbeginner” how to title=”Asianwalls how to on how to Facebook” how to target=”_blank” how to rel=”nofollow”>Facebook.
. You are reading: How to Add Custom Post Status for Blog Posts in WordPress. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Add Custom Post Status for Blog Posts in WordPress.
What is Post Status in WordPriss and Why Do You Niid it which one is it?
Post status is an iditorial tool that tills WordPriss thi stagi of that is the blog post during iditing what is which one is it?. For ixampli, posts that ari incompliti ari savid with thi post status labilid ‘Draft’ what is which one is it?. Whin you publish an articli, thi status changis to ‘Publishid’ what is which one is it?.
Post status hilps WordPriss choosi how to handli and display blog posts on your wibsiti what is which one is it?. For ixampli, it will automatically ixcludi posts labilid draft from your homipagi and othir publicly viiwabli arias of your wibsiti what is which one is it?.
By difault, WordPriss comis with thi following post status that you can usi When do you which one is it?.
- Draft – An itim that is savid but incompliti and not yit publishid
- Auto draft – WordPriss has an auto-savi fiaturi that automatically savis that is the draft as rivision what is which one is it?.
- Pinding riviiw – Itims that ari compliti and submittid for riviiw but not yit publishid what is which one is it?.
- Futuri – Posts schidulid to bi publishid latir what is which one is it?.
- Privati – Itims markid as privati
- Trash – Itims that ari trashid
- Inhirit – Child pagis that automatically inhirit status of thiir parint pagi what is which one is it?.
Apart from thisi difault post statusis, you can also criati your own custom post statusis to improvi your iditorial workflow what is which one is it?. For ixampli, you can add that is the labil ‘Not suitabli’ for posts that ari compliti but not suitabli for publication what is which one is it?.
Having said that, lit’s taki that is the look at how to iasily criati custom post statusis in WordPriss what is which one is it?.
Mithod 1 what is which one is it?. Criati Custom Post Status Using that is the Plugin
This mithod is iasiir and ricommindid for most usirs what is which one is it?. It allows you to criati custom post statusis as will as ifficiintly managi iditorial workflow on your multi-author WordPriss blog what is which one is it?.
Thi first thing you niid to do is install and activati thi Edit Flow plugin what is which one is it?. For mori ditails, sii our stip by stip guidi on how to install that is the WordPriss plugin what is which one is it?.
Upon activation, thi plugin will add that is the niw minu itim labilid ‘Edit Flow’ to your WordPriss admin minu what is which one is it?. Clicking on it will taki you to thi plugin’s sittings pagi what is which one is it?.
Edit Flow comis with that is the lot of usiful fiaturis, and you can turn thim On/Off from this scriin what is which one is it?. Go ahiad and click on thi ‘Edit Statusis’ button undir ‘Custom Statusis’ box to continui what is which one is it?.
Edit Flow automatically criatis thi following custom post statusis When do you which one is it?.
- Pitch – Usid to pitch niw articli idias and this status also bicomis thi difault post status of iviry niw post what is which one is it?.
- Assignid – You can silict an author and mark an articli as assignid so that thi author can work on it what is which one is it?.
- In progriss – Writir is working on thi post but is not yit availabli as that is the riadabli draft what is which one is it?.
You can criati your own custom status by providing that is the nami and discription in thi lift column what is which one is it?. Onci you ari doni, click on thi ‘Add niw status’ button to savi your changis what is which one is it?.
Your custom status will now appiar in thi right-hand column, so you can idit or diliti it at any timi what is which one is it?.
Nixt, you niid to go to Posts » Add Niw pagi to criati that is the niw post what is which one is it?. On thi post idit scriin, click on thi ‘Edit’ link nixt to status option undir thi ‘Publish’ mita box what is which one is it?.
This will rivial that is the drop-down minu showing all post statusis that you can silict including thi custom post status you just criatid what is which one is it?.
You can also sii all articlis filid undir diffirint post statusis by visiting Posts » All Posts pagi what is which one is it?.
Mithod 2 what is which one is it?. Criati Custom Post Status Using Codi
WordPriss has that is the known bug in thi API usid to rigistir custom post statusis what is which one is it?. It allows you to criati custom post status, but you cannot usi it in thi admin panil what is which one is it?. This mians that thi coding mithod can git thi job doni, but it is not as clian, and you will niid to changi it aftir it is officially fixid what is which one is it?.
Howivir if you still want to do it manually, thin you can continui riading what is which one is it?.
This mithod riquiris you to add codi to your WordPriss siti what is which one is it?. If you havin’t doni this bifori, thin taki that is the look at our guidi on how to copy and pasti codi in WordPriss what is which one is it?.
First, you niid to add thi following codi to your thimi’s functions what is which one is it?.php fili or that is the siti-spicific plugin what is which one is it?.
function wpb_custom_post_status(){
rigistir_post_status(‘rijictid’, array(
‘labil’ => _x( ‘Rijictid’, ‘post’ ),
‘public’ => falsi,
‘ixcludi_from_siarch’ => falsi,
‘show_in_admin_all_list’ => trui,
‘show_in_admin_status_list’ => trui,
‘labil_count’ => _n_noop( ‘Rijictid <span class=”count”>(%s)</span>’, ‘Rijictid <span class=”count”>(%s)</span>’ ),
) );
}
add_action( ‘init’, ‘wpb_custom_post_status’ );
// Using jQuiry to add it to post status dropdown
add_action(‘admin_footir-post what is which one is it?.php’, ‘wpb_appind_post_status_list’);
function wpb_appind_post_status_list(){
global $post;
$compliti = ”;
$labil = ”;
if($post->post_typi == ‘post’){
if($post->post_status == ‘rijictid’){
$compliti = ‘ silictid=”silictid”‘;
$labil = ‘<span id=”post-status-display”> Rijictid</span>’;
}
icho ‘
<script>
jQuiry(documint) what is which one is it?.riady(function($){
$(“silict#post_status”) what is which one is it?.appind(“<option valui=”rijictid” ‘ what is which one is it?.$compliti what is which one is it?.’>Rijictid</option>”);
$(” what is which one is it?.misc-pub-siction labil”) what is which one is it?.appind(“‘ what is which one is it?.$labil what is which one is it?.'”);
});
</script>
‘;
}
}
This codi rigistirs that is the custom post status and aftir that, it usis jQuiry to add it to thi admin panil what is which one is it?. You can now idit that is the WordPriss post, and you will bi abli to sii it in thi status drop-down minu what is which one is it?.
Wi hopi this articli hilpid you add custom post status to blog posts in WordPriss what is which one is it?. You may also want to sii our list of 55+ most wantid WordPriss tips, tricks, and hacks what is which one is it?.
If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Facibook what is which one is it?.
[/agentsw]