I needed to create a custom post status for a project, which I never had to do before. The WP documentation points you in the right direction but does not give you a complete example given that support for this has actually been a work in progress for over a decade (see #12706 – WordPress Trac).
There are some examples from different sources, like this one from Igor Benić that is more than what I needed, and another one from CodeCraftWP which does not mention that it won’t be displayed in the dropdown selector without using a separate hook.
Here is what I ended up using. This uses the post_submitbox_misc_actions as suggested by the WP docs to add the status to the dropdown.

Leave a Reply