admin管理员组文章数量:1384952
Gutenberg does not show our custom taxonomies in the editor sidebar. They have always been there using the classic editor. I have addressed the usual suspects (see below) but had no luck. Here is what I've tried:
- added "show_in_rest" => true to the $args
- added "public" => true to the $args
- switched off all plugins (to ensure it is not caused by any of them)
- switched back to the old editor via "classic editor" plugin (then they appear again immediately)
- ensured I don't use a reserved word
Here is the code I use to generate the taxonomy - if you have any advice, I would be more than happy to hear your thoughts.
thanks
Jan
$labels = array(
'name' => _x('Jahreszeiten', 'taxonomy general name', 'mysite'),
'singular_name' => _x('Jahreszeit', 'taxonomy singular name', 'mysite'),
'search_items' => __('Jahreszeiten durchsuchen', 'mysite'),
'all_items' => __('Alle Jahreszeiten', 'mysite'),
'parent_item' => __('Übergeordnete Jahreszeit', 'mysite'),
'parent_item_colon' => __('Übergeordnete Jahreszeit:', 'mysite'),
'edit_item' => __('Jahreszeit bearbeiten', 'mysite'),
'update_item' => __('Jahreszeit aktualisieren', 'mysite'),
'add_new_item' => __('Neue Jahreszeit hinzufügen', 'mysite'),
'new_item_name' => __('Neue Jahreszeit', 'mysite'),
'menu_name' => __('Jahreszeit', 'mysite'),
);
$rewrite = array(
'with_front' => false,
'hierarchical' => true,
'slug' => __('jahreszeit', 'mysite'),
);
$args = array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'show_in_rest' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => $rewrite,
);
register_taxonomy('jahreszeit', array('post', 'pages'), $args);
Gutenberg does not show our custom taxonomies in the editor sidebar. They have always been there using the classic editor. I have addressed the usual suspects (see below) but had no luck. Here is what I've tried:
- added "show_in_rest" => true to the $args
- added "public" => true to the $args
- switched off all plugins (to ensure it is not caused by any of them)
- switched back to the old editor via "classic editor" plugin (then they appear again immediately)
- ensured I don't use a reserved word
Here is the code I use to generate the taxonomy - if you have any advice, I would be more than happy to hear your thoughts.
thanks
Jan
$labels = array(
'name' => _x('Jahreszeiten', 'taxonomy general name', 'mysite'),
'singular_name' => _x('Jahreszeit', 'taxonomy singular name', 'mysite'),
'search_items' => __('Jahreszeiten durchsuchen', 'mysite'),
'all_items' => __('Alle Jahreszeiten', 'mysite'),
'parent_item' => __('Übergeordnete Jahreszeit', 'mysite'),
'parent_item_colon' => __('Übergeordnete Jahreszeit:', 'mysite'),
'edit_item' => __('Jahreszeit bearbeiten', 'mysite'),
'update_item' => __('Jahreszeit aktualisieren', 'mysite'),
'add_new_item' => __('Neue Jahreszeit hinzufügen', 'mysite'),
'new_item_name' => __('Neue Jahreszeit', 'mysite'),
'menu_name' => __('Jahreszeit', 'mysite'),
);
$rewrite = array(
'with_front' => false,
'hierarchical' => true,
'slug' => __('jahreszeit', 'mysite'),
);
$args = array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'show_in_rest' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => $rewrite,
);
register_taxonomy('jahreszeit', array('post', 'pages'), $args);
Share
Improve this question
asked Jun 5, 2019 at 11:31
JanJan
216 bronze badges
1 Answer
Reset to default 2You can try 'show_in_rest' => true
as an argument in custom post types along with taxonomy registration.
本文标签: block editorcustom taxonomy not showing in Gutenberg
版权声明:本文标题:block editor - custom taxonomy not showing in Gutenberg 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744510389a2609844.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论