Enter your keyword

Blog

How to add Custom Status in Post/Custom Post Type in WordPress

function unapproved_post_status(){
    register_post_status( 'unapproved', array(
    'label'                     => _x( 'Unapproved', 'post' ),
    'public'                    => true,
    'exclude_from_search'       => false,
    'show_in_admin_all_list'    => true,
    'show_in_admin_status_list' => true,
    'label_count'               => _n_noop('Unapproved <span class="count">(%s)</span>', 'Unapproved <span class="count">(%s)</span>' ), ) );
}
add_action( 'init', 'unapproved_post_status' );

No Comments

Add your review

Your email address will not be published.

* Feilds are Required.