Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Post Status

if ( ! function_exists( 'customposttypes_property_status_taxonomy' ) ) {

// Register Custom Taxonomy
function customposttypes_property_status_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Property Status', 'Taxonomy General Name', 'customposttypes' ),
		'singular_name'              => _x( 'Property Status', 'Taxonomy Singular Name', 'customposttypes' ),
		'menu_name'                  => __( 'Property Status', 'customposttypes' ),
		'all_items'                  => __( 'All Property Status', 'customposttypes' ),
		'parent_item'                => __( 'Parent Property Status', 'customposttypes' ),
		'parent_item_colon'          => __( 'Parent Property Status:', 'customposttypes' ),
		'new_item_name'              => __( 'New Property Status Name', 'customposttypes' ),
		'add_new_item'               => __( 'Add New Property Status', 'customposttypes' ),
		'edit_item'                  => __( 'Edit Property Status', 'customposttypes' ),
		'update_item'                => __( 'Update Property Status', 'customposttypes' ),
		'view_item'                  => __( 'View Property Status', 'customposttypes' ),
		'separate_items_with_commas' => __( 'Separate Property Status with commas', 'customposttypes' ),
		'add_or_remove_items'        => __( 'Add or remove Property Status', 'customposttypes' ),
		'choose_from_most_used'      => __( 'Choose from the most used Property Status', 'customposttypes' ),
		'popular_items'              => __( 'Popular Property Status', 'customposttypes' ),
		'search_items'               => __( 'Search Property Status', 'customposttypes' ),
		'not_found'                  => __( 'Not Found', 'customposttypes' ),
		'no_terms'                   => __( 'No Property Status', 'customposttypes' ),
		'items_list'                 => __( 'Property Status list', 'customposttypes' ),
		'items_list_navigation'      => __( 'Property Status list navigation', 'customposttypes' ),
	);
	$rewrite = array(
		'slug'                       => 'property-status',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'rewrite'                    => $rewrite,
		'show_in_rest'               => true,
	);
	register_taxonomy( 'propertystatus', array( 'property' ), $args );

}
add_action( 'init', 'customposttypes_property_status_taxonomy', 0 );

}