FEATURE Addind a modified 'rest_base' for taxonomy top avoid errors due to confusion with default inherited types in the rest base
This commit is contained in:
parent
67df0f541b
commit
b249d9f460
|
|
@ -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
|
||||
--------------------------------------------------*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user