Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Département

// Register Custom Taxonomy
function departement() {

	$labels = array(
		'name'                       => _x( 'Départements', 'Taxonomy General Name', 'departement_bestofsite' ),
		'singular_name'              => _x( 'Département', 'Taxonomy Singular Name', 'departement_bestofsite' ),
		'menu_name'                  => __( 'Département', 'departement_bestofsite' ),
		'all_items'                  => __( 'tous les departments', 'departement_bestofsite' ),
		'parent_item'                => __( 'Parent Item', 'departement_bestofsite' ),
		'parent_item_colon'          => __( 'Parent Item:', 'departement_bestofsite' ),
		'new_item_name'              => __( 'Nouveau nom département', 'departement_bestofsite' ),
		'add_new_item'               => __( 'Ajouter un département', 'departement_bestofsite' ),
		'edit_item'                  => __( 'Editer le déparetment', 'departement_bestofsite' ),
		'update_item'                => __( 'Mettre à jour', 'departement_bestofsite' ),
		'separate_items_with_commas' => __( 'Separate items with commas', 'departement_bestofsite' ),
		'search_items'               => __( 'Search Items', 'departement_bestofsite' ),
		'add_or_remove_items'        => __( 'Add or remove items', 'departement_bestofsite' ),
		'choose_from_most_used'      => __( 'Choose from the most used items', 'departement_bestofsite' ),
		'not_found'                  => __( 'Not Found', 'departement_bestofsite' ),
	);
	$rewrite = array(
		'slug'                       => 'departement',
		'with_front'                 => true,
		'hierarchical'               => true,
	);
	$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( 'departement', array( 'evenement_bestof' ), $args );

}

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