Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

MATCOM: Parts Category

// Register Custom Taxonomy
function tmg_taxonomy_parts_category() {

	$labels = array(
		'name'                       => _x( 'Parts Categories', 'Taxonomy General Name', 'tmg' ),
		'singular_name'              => _x( 'Parts Category', 'Taxonomy Singular Name', 'tmg' ),
		'menu_name'                  => __( 'Parts Categories', 'tmg' ),
		'all_items'                  => __( 'All Parts Categories', 'tmg' ),
		'parent_item'                => __( 'Parent Parts Category', 'tmg' ),
		'parent_item_colon'          => __( 'Parent Parts Category:', 'tmg' ),
		'new_item_name'              => __( 'New Parts Category Name', 'tmg' ),
		'add_new_item'               => __( 'Add New Parts Category', 'tmg' ),
		'edit_item'                  => __( 'Edit Parts Category', 'tmg' ),
		'update_item'                => __( 'Update Parts Category', 'tmg' ),
		'separate_items_with_commas' => __( 'Separate parts categories with commas', 'tmg' ),
		'search_items'               => __( 'Search Parts Categories', 'tmg' ),
		'add_or_remove_items'        => __( 'Add or remove parts categories', 'tmg' ),
		'choose_from_most_used'      => __( 'Choose from the most used parts categories', 'tmg' ),
		'not_found'                  => __( 'Not Found', 'tmg' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => false,
		'show_tagcloud'              => true,
	);
	register_taxonomy( 'parts_category', array( 'tmg_parts_vendor' ), $args );

}

// Hook into the 'init' action
add_action( 'init', 'tmg_taxonomy_parts_category', 0 );