Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

kk_vendor

// Register Custom Taxonomy
function kk_vendor() {

	$labels = array(
		'name'                       => 'Vendors',
		'singular_name'              => 'Vendor',
		'menu_name'                  => 'Vendors',
		'all_items'                  => 'All Vendors',
		'parent_item'                => 'Parent Vendor',
		'parent_item_colon'          => 'Parent Vendor:',
		'new_item_name'              => 'New Vendor Name',
		'add_new_item'               => 'Add New Vendor',
		'edit_item'                  => 'Edit Vendor',
		'update_item'                => 'Update Vendor',
		'view_item'                  => 'View Vendor',
		'separate_items_with_commas' => 'Separate vendor with commas',
		'add_or_remove_items'        => 'Add or remove vendors',
		'choose_from_most_used'      => 'Choose from the most used',
		'popular_items'              => 'Popular Vendors',
		'search_items'               => 'Search Vendor',
		'not_found'                  => 'Not Found',
		'no_terms'                   => 'Novendors',
		'items_list'                 => 'Vendors list',
		'items_list_navigation'      => 'Vendors list navigation',
	);
	$rewrite = array(
		'slug'                       => 'products/vendor',
		'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'              => true,
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'kk_vendor', array( 'kk_products' ), $args );

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