Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Brands taxonomy

Taxonomy for WooCommerce

// Register Custom Taxonomy
function brand_taxonomy() {

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

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