Adding custom post status to visibility in publish meta box

I also don’t see a way to edit that form in that location, though there is a hook called post_submitbox_misc_actions near the bottom.

I strongly suggest that use that post_submitbox_misc_actions hook or add your own brand new meta_box to the page. There are potentially severe consequences to altering the default meta_boxes, especially that one.

However… if you must…

Remove that box:

function remove_taxonomies_submit_box() {
    remove_meta_box( 'submitdiv', 'book', 'side' );
}
add_action( 'add_meta_boxes_book' , 'remove_taxonomies_submit_box', 100 );

And add back a box of your own construction (Generic Example):

function add_altered_submit_box() {
  add_meta_box(
    'submitdiv', // id, used as the html id att
    __( 'Generic Title' ), // meta box title
    'generic_cb', // callback function, spits out the content
    'book', // post type or page. 
    'side', // context, where on the screen
    'high' // priority, where should this go in the context
  );
}
add_action( 'add_meta_boxes_book' , 'add_altered_submit_box', 101 );

The callback, of course, will be a near duplicate of the original submit box callback. The post type in those examples is ‘book’ that will need to be changed to match your post type.

Leave a Comment

error code: 523