最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

I can't choose the custom taxonomy in my custom post type on Gutenberg

programmeradmin1浏览0评论

I'm new here and in Wordpress Development.

I have a custom post type that works with a custom taxonomy. In the classic editor, I can choose the category or add new if I want, but when I'm on Gutenberg the option doesn't show it.

Thanks]1

I'm new here and in Wordpress Development.

I have a custom post type that works with a custom taxonomy. In the classic editor, I can choose the category or add new if I want, but when I'm on Gutenberg the option doesn't show it.

Thanks]1

Share Improve this question asked May 8, 2019 at 14:33 Martin ArzuagaMartin Arzuaga 132 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

As Gutenberg does nearly everything over REST-API, you will have to update your register_taxonomy to be shown in REST, as the default value for show_in_rest in register_taxonomy is false.

So, you update your $args array in the function custom_taxonomy and add

'show_in_rest' => true

and you should be fine.

Happy Coding!

发布评论

评论列表(0)

  1. 暂无评论