Custom post status not appearing
-
Hello, I’m trying to create two custom post status’. I used the Codex to generate the code and that didn’t work. Then I went to https://generatewp.com/post-status and it didn’t work either. It isn’t showing up in the dropdown next to “Status” in “Edit Post”.
Do you see anything wrong with my code?
// ***** https://generatewp.com/post-status **** //
function custom_post_status() {
$args = array(
‘label’ => ‘Reserve’,
‘label_count’ => ‘Reserve (%s)’,
‘public’ => false,
‘show_in_admin_all_list’ => true,
‘show_in_admin_status_list’ => true,
‘exclude_from_search’ => false,
);
register_post_status( ‘Reserve’, $args );}
add_action( ‘init’, ‘custom_post_status’, 0 );
function custom_post_status_2() {
$args = array(
‘label’ => ‘Ready to be Scheduled’,
‘label_count’ => ‘Ready to be Scheduled (%s)’,
‘public’ => false,
‘show_in_admin_all_list’ => true,
‘show_in_admin_status_list’ => true,
‘exclude_from_search’ => false,
);
register_post_status( ‘Ready to be Scheduled’, $args );}
add_action( ‘init’, ‘custom_post_status_2’, 0 );
Thank you!
- The topic ‘Custom post status not appearing’ is closed to new replies.