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
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
No comments:
Post a Comment