Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Tax Vendor Types

if ( ! function_exists( 'metc_vendor_types' ) ) {

// Register Custom Taxonomy
function metc_vendor_types() {

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

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

}