Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Billco Product Category Taxonomy

if ( ! function_exists( 'billco_product_category' ) ) {

// Register Custom Taxonomy
function billco_product_category() {

	$labels = array(
		'name'                       => _x( 'Billco Product Categories', 'Taxonomy General Name', 'o2dca_framework' ),
		'singular_name'              => _x( 'Billco Product Category', 'Taxonomy Singular Name', 'o2dca_framework' ),
		'menu_name'                  => __( 'Billco Product Category', 'o2dca_framework' ),
		'all_items'                  => __( 'All Billco Product Categories', 'o2dca_framework' ),
		'parent_item'                => __( 'Parent Billco Product Category', 'o2dca_framework' ),
		'parent_item_colon'          => __( 'Parent Billco Product Category:', 'o2dca_framework' ),
		'new_item_name'              => __( 'New Billco Product Category Name', 'o2dca_framework' ),
		'add_new_item'               => __( 'Add New Billco Product Category', 'o2dca_framework' ),
		'edit_item'                  => __( 'Edit Billco Product Category', 'o2dca_framework' ),
		'update_item'                => __( 'Update Billco Product Category', 'o2dca_framework' ),
		'view_item'                  => __( 'View Billco Product Category', 'o2dca_framework' ),
		'separate_items_with_commas' => __( 'Separate items with commas', 'o2dca_framework' ),
		'add_or_remove_items'        => __( 'Add or remove Billco product categories', 'o2dca_framework' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'o2dca_framework' ),
		'popular_items'              => __( 'Popular Billco Product Categories', 'o2dca_framework' ),
		'search_items'               => __( 'Search Billco Product Categories', 'o2dca_framework' ),
		'not_found'                  => __( 'Not Found', 'o2dca_framework' ),
		'no_terms'                   => __( 'No Billco product categories', 'o2dca_framework' ),
		'items_list'                 => __( 'Billco Product Categories list', 'o2dca_framework' ),
		'items_list_navigation'      => __( 'Billco Product Categories list navigation', 'o2dca_framework' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => false,
	);
	register_taxonomy( 'billco-product-category', array( 'billco-products' ), $args );

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

}