How to add a custom post status in wordpress for custom post type or post post type

For add a new custom post status add below code in your theme's function.php or your custom plugin's file <?php function rj_custom_post_status ( ) { register_post_status ( 'hide' , array ( // hide => change with your custom status slug 'label' => _x ( 'Hide' , 'post' ) , // Hide -> change with ur status name 'public' => true , 'exclude_from_search' =>false, 'show_in_admin_all_list' => false , 'show_in_admin_status_list' => true , 'label_count' => _n_noop ( 'Hide<span class="count">(%s)</span>' , 'Hide<span class="count">(%s)</span>' ) ) ) ; } add_action ( 'init' , 'rj_custom_post_status',10 ) ; ?> For Display custom status on d...