Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

BT Lot Type

if ( ! function_exists( 'bt_lot_type' ) ) {

// Register Custom Taxonomy
function bt_lot_type() {

	$labels = array(
		'name'                       => _x( 'Lot Types', 'Taxonomy General Name', 'bellaterra' ),
		'singular_name'              => _x( 'Lot Type', 'Taxonomy Singular Name', 'bellaterra' ),
		'menu_name'                  => __( 'Lot Types', 'bellaterra' ),
		'all_items'                  => __( 'All Lot Types', 'bellaterra' ),
		'parent_item'                => __( 'Parent Lot Type', 'bellaterra' ),
		'parent_item_colon'          => __( 'Parent Lot Type:', 'bellaterra' ),
		'new_item_name'              => __( 'New Lot Type Name', 'bellaterra' ),
		'add_new_item'               => __( 'Add New Lot Type', 'bellaterra' ),
		'edit_item'                  => __( 'Edit Lot Type', 'bellaterra' ),
		'update_item'                => __( 'Update Lot Type', 'bellaterra' ),
		'separate_items_with_commas' => __( 'Separate lot types with commas', 'bellaterra' ),
		'search_items'               => __( 'Search Lot Types', 'bellaterra' ),
		'add_or_remove_items'        => __( 'Add or remove lot types', 'bellaterra' ),
		'choose_from_most_used'      => __( 'Choose from the most used lot types', 'bellaterra' ),
		'not_found'                  => __( 'Not Found', 'bellaterra' ),
	);
	$rewrite = array(
		'slug'                       => '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'              => false,
		'query_var'                  => 'type',
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'bt_lot_type', array( 'bt_lot' ), $args );

}

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

}