Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Features Category

Category pour mon CPT Features

if ( ! function_exists( 'feature_cat' ) ) {

// Register Custom Taxonomy
function feature_cat() {

	$labels = array(
		'name'                       => _x( 'Feature Categories', 'Taxonomy General Name', 'dik' ),
		'singular_name'              => _x( 'Feature Category', 'Taxonomy Singular Name', 'dik' ),
		'menu_name'                  => __( 'Feature Category', 'dik' ),
		'all_items'                  => __( 'All Category', 'dik' ),
		'parent_item'                => __( 'Parent Category', 'dik' ),
		'parent_item_colon'          => __( 'Parent Category:', 'dik' ),
		'new_item_name'              => __( 'New Category Name', 'dik' ),
		'add_new_item'               => __( 'Add New Category', 'dik' ),
		'edit_item'                  => __( 'Edit Category', 'dik' ),
		'update_item'                => __( 'Update ItCategorym', 'dik' ),
		'view_item'                  => __( 'View Category', 'dik' ),
		'separate_items_with_commas' => __( 'Separate Category with commas', 'dik' ),
		'add_or_remove_items'        => __( 'Add or remove Category', 'dik' ),
		'choose_from_most_used'      => __( 'Choose from the most used', 'dik' ),
		'popular_items'              => __( 'Popular Category', 'dik' ),
		'search_items'               => __( 'Search Category', 'dik' ),
		'not_found'                  => __( 'Not Found', 'dik' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
	);
	register_taxonomy( 'feature_cat', array( 'Features' ), $args );

}

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

}