From b249d9f460ccba7e3e28cf9609170709c003e219 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 24 Feb 2026 14:53:47 +0100 Subject: [PATCH] FEATURE Addind a modified 'rest_base' for taxonomy top avoid errors due to confusion with default inherited types in the rest base --- mu-plugins/carhop-post-types.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mu-plugins/carhop-post-types.php b/mu-plugins/carhop-post-types.php index 2ce041e..2dddd8e 100644 --- a/mu-plugins/carhop-post-types.php +++ b/mu-plugins/carhop-post-types.php @@ -223,7 +223,7 @@ function carhop_register_taxonomies() 'search_items' => __('Rechercher des types', 'carhop-post-types'), 'not_found' => __('Non trouvé', 'carhop-post-types'), 'no_terms' => __('Aucun type', 'carhop-post-types'), - 'items_list' => __('Liste des types', 'carhop-post-types'), + 'items_list' => __('Liste des types', 'carhop-post-types'), 'items_list_navigation' => __('Navigation dans la liste des types', 'carhop-post-types'), ); $args = array( @@ -235,6 +235,7 @@ function carhop_register_taxonomies() 'show_in_nav_menus' => true, 'show_tagcloud' => true, 'show_in_rest' => true, // Important pour l'éditeur Gutenberg + 'rest_base' => 'study_type', 'rewrite' => array('slug' => 'type'), ); register_taxonomy('type', array('analyses-etudes'), $args); @@ -242,6 +243,7 @@ function carhop_register_taxonomies() add_action('init', 'carhop_register_taxonomies', 0); + /* ------------------------------------------------ ##### CHANGE LE NOM DES POSTS PAR ACTUALITES --------------------------------------------------*/