Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

HTC – Listing types

// Register Custom Taxonomy
function listing_type_taxonomy() {

	$labels = array(
		'name'                       => 'Listing Types',
		'singular_name'              => 'Listing Type',
		'menu_name'                  => 'Listing Type',
		'all_items'                  => 'All Listing Types',
		'parent_item'                => 'Parent Listing Type',
		'parent_item_colon'          => 'Parent Listing Type:',
		'new_item_name'              => 'New Listing Type',
		'add_new_item'               => 'Add New Listing Type',
		'edit_item'                  => 'Edit Listing Type',
		'update_item'                => 'Update Listing Type',
		'view_item'                  => 'View Listing Type',
		'separate_items_with_commas' => 'Separate listing types with commas',
		'add_or_remove_items'        => 'Add or remove items',
		'choose_from_most_used'      => 'Choose from the most used',
		'popular_items'              => 'Popular Listing Types',
		'search_items'               => 'Search Listing Types',
		'not_found'                  => 'Not Found',
		'items_list'                 => 'Listing type list',
		'items_list_navigation'      => 'Items list navigation',
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => false,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
	);
	register_taxonomy( 'listing_type', array( 'directory' ), $args );

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