admin管理员组

文章数量:1023856

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!

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!

本文标签: I can39t choose the custom taxonomy in my custom post type on Gutenberg