Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Hidden Post Status

if ( ! function_exists('hidden_post_status') ) {

// Register Custom Status
function hidden_post_status() {

	$args = array(
		'label'                     => _x( 'Hidden', 'Status General Name', 'text_domain' ),
		'label_count'               => _n_noop( 'Hidden Post (%s)',  'Hidden Posts (%s)', 'text_domain' ), 
		'public'                    => false,
		'show_in_admin_all_list'    => true,
		'show_in_admin_status_list' => true,
		'exclude_from_search'       => true,
	);
	register_post_status( 'Hidden', $args );

}

// Hook into the 'init' action
add_action( 'init', 'hidden_post_status', 0 );

}