diff --git a/includes/taxonomy.php b/includes/taxonomy.php index dde2871..e69f9c3 100644 --- a/includes/taxonomy.php +++ b/includes/taxonomy.php @@ -80,7 +80,7 @@ function homegrade_add_custom_taxonomies() // ————— Type de news ————— - register_taxonomy('news-type', 'post', array( + register_taxonomy('news_type', 'post', array( 'labels' => array( 'name' => __('Types', 'homegrade-theme__texte-backoffice'), 'singular_name' => __('Type', 'homegrade-theme__texte-backoffice'), @@ -95,6 +95,11 @@ function homegrade_add_custom_taxonomies() 'menu_name' => __('Type', 'homegrade-theme__texte-backoffice'), ), 'hierarchical' => false, + 'show_in_rest' => true, + 'default_term' => [ + 'name' => ' Général', + 'slug' => 'general', + ], ));