Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Brand taxonomy

Taxonomy of all brands

// Register Custom Taxonomy
function brand_taxonomy() {

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

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