Pages

Showing posts with label wordpress. post status. Show all posts
Showing posts with label wordpress. post status. Show all posts

Tuesday, August 27, 2013

Wordpress insert new post status

Please write below code in your functions.php


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

I have use this code for deactivate post status