How Do I Add a Custom Post Status in WordPress?

Adding a custom post status in WordPress is a fairly simple process. To begin, first you will need to locate the post status template file in your WordPress install. The file is located in the wp-includes/post-status.

php file. Once you have located the file, you can begin editing it.

The first thing you will need to do is locate the template’s opening

After that, you will need to add the post status code to the template. The code you will need to use depends on the post status you want to add. The code for the default post status is:

echo ‘

Post Status

‘;

echo ‘

‘;

echo ‘

This post is currently open.

‘;

echo ‘

‘;

If you want to add a custom post status, you will need to use the code for the custom post status. The code for the custom post status is:

echo ‘

Custom Post Status

‘;

echo ‘

This post is currently in %2$s.’,

esc_url( get_permalink() ), esc_attr( get_the_title() );.