Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Taxo-theme-doc

// Register Custom Taxonomy
function doc_taxonomy() {

	$labels = array(
		'name'                       => _x( 'Thème des documents', 'Taxonomy General Name', 'text_domain' ),
		'singular_name'              => _x( 'Thème du document', 'Taxonomy Singular Name', 'text_domain' ),
		'menu_name'                  => __( 'Thème du document', 'text_domain' ),
		'all_items'                  => __( 'Tous les thèmes', 'text_domain' ),
		'parent_item'                => __( 'Thème parent', 'text_domain' ),
		'parent_item_colon'          => __( 'Thème parent:', 'text_domain' ),
		'new_item_name'              => __( 'Nouveau thème', 'text_domain' ),
		'add_new_item'               => __( 'Ajouter nouveau thème', 'text_domain' ),
		'edit_item'                  => __( 'Editer thème', 'text_domain' ),
		'update_item'                => __( 'Update thème', 'text_domain' ),
		'view_item'                  => __( 'Voir thème', 'text_domain' ),
		'separate_items_with_commas' => __( 'Séparer les thèmes par une virgule', 'text_domain' ),
		'add_or_remove_items'        => __( 'Ajouter ou supprimer les thèmes', 'text_domain' ),
		'choose_from_most_used'      => __( 'Choisir parmi les plus utilisés', 'text_domain' ),
		'popular_items'              => __( 'Thème populaire', 'text_domain' ),
		'search_items'               => __( 'Chercher un thème', 'text_domain' ),
		'not_found'                  => __( 'Pas trouvé', 'text_domain' ),
		'no_terms'                   => __( 'Pas de thèmes', 'text_domain' ),
		'items_list'                 => __( 'Liste des thèmes', 'text_domain' ),
		'items_list_navigation'      => __( 'Navigation dans la liste des thèmes', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                       => 'documents/thème',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'rewrite'                    => $rewrite,
	);
	register_taxonomy( 'theme_docs', array( 'documents' ), $args );

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