Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Truck Brands

// Register Custom Taxonomy
function custom_taxonomy() {

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

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