Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

register_taxonomy( ‘cat-portfolio’

// Register Custom Taxonomy
function cat_portfolio() {

	$labels = array(
		'name'                       => _x( 'Catégories portfolio', 'Taxonomy General Name', 'htmlblank' ),
		'singular_name'              => _x( 'Catégorie portfolio', 'Taxonomy Singular Name', 'htmlblank' ),
		'menu_name'                  => __( 'Catégorie portfolio', 'htmlblank' ),
		'all_items'                  => __( 'Toutes les Catégories', 'htmlblank' ),
		'parent_item'                => __( 'Catégorie Parent', 'htmlblank' ),
		'parent_item_colon'          => __( 'Catégorie :', 'htmlblank' ),
		'new_item_name'              => __( 'Nouvelle catégorie Portfolio', 'htmlblank' ),
		'add_new_item'               => __( 'Ajouter une catégorie Portfolio', 'htmlblank' ),
		'edit_item'                  => __( 'Modifier catégorie Portfolio', 'htmlblank' ),
		'update_item'                => __( 'Mettre à jour catégorie Portfolio', 'htmlblank' ),
		'view_item'                  => __( 'Voir catégorie Portfolio', 'htmlblank' ),
		'separate_items_with_commas' => __( 'Séparez les éléments par des virgules', 'htmlblank' ),
		'add_or_remove_items'        => __( 'Ajouter ou supprimer catégorie Portfolio', 'htmlblank' ),
		'choose_from_most_used'      => __( 'Choisissez parmi les plus utilisés', 'htmlblank' ),
		'popular_items'              => __( 'Catégories populaires', 'htmlblank' ),
		'search_items'               => __( 'Rechercher une catégorie', 'htmlblank' ),
		'not_found'                  => __( 'Aucune catégorie trouvée', 'htmlblank' ),
		'no_terms'                   => __( 'Aucune catégories', 'htmlblank' ),
		'items_list'                 => __( 'Liste des catégories Portfolio', 'htmlblank' ),
		'items_list_navigation'      => __( 'Liste des catégories Portfolio', 'htmlblank' ),
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'show_in_rest'               => true,
	);
	register_taxonomy( 'cat-portfolio', array( 'portfolio' ), $args );

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