Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

property_type

// Register Custom Taxonomy
function jw_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Property Types', 'Taxonomy General Name', 'joinweb' ),
		'singular_name'              => _x( 'Property Type', 'Taxonomy Singular Name', 'joinweb' ),
		'menu_name'                  => __( 'Property Types', 'joinweb' ),
		'all_items'                  => __( 'All Property Types', 'joinweb' ),
		'parent_item'                => __( 'Parent Property Type', 'joinweb' ),
		'parent_item_colon'          => __( 'Parent Property Type:', 'joinweb' ),
		'new_item_name'              => __( 'New Property Type Name', 'joinweb' ),
		'add_new_item'               => __( 'Add New Property Type', 'joinweb' ),
		'edit_item'                  => __( 'Edit Property Type', 'joinweb' ),
		'update_item'                => __( 'Update Property Type', 'joinweb' ),
		'view_item'                  => __( 'View Property Type', 'joinweb' ),
		'separate_items_with_commas' => __( 'Separate items with commas', 'joinweb' ),
		'add_or_remove_items'        => __( 'Add or remove items', 'joinweb' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'joinweb' ),
		'popular_items'              => __( 'Popular Property Types', 'joinweb' ),
		'search_items'               => __( 'Search Property Types', 'joinweb' ),
		'not_found'                  => __( 'Not Found', 'joinweb' ),
	);
	$rewrite = array(
		'slug'                       => 'property_type',
		'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,
		'query_var'                  => 'property_type',
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'property_type', array( 'property' ), $args );

}

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