Thème agenda taxo
// Register Custom Taxonomy
function theme_taxonomy() {
$labels = array(
'name' => _x( 'Thèmes', 'Taxonomy General Name', 'text_domain' ),
'singular_name' => _x( 'Thème', 'Taxonomy Singular Name', 'text_domain' ),
'menu_name' => __( 'Thèmes', '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' => 'agenda/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', array( 'agenda' ), $args );
}
add_action( 'init', 'theme_taxonomy', 0 );