Wordpress - Custom taxonomy terms not showing as list Gutenberg Editor

I face the same as your problem and solved as the following

you must add 'show_in_rest' => true, for both post_type and taxonomies int the last line of array such as

register_post_type(
'portfolio',
 array(
 'labels'              => $labels,
 'exclude_from_search' => false,
'has_archive'         => true,
'public'              => true,
'publicly_queryable' => false,
'rewrite'  => false,
'can_export'          => true,
'show_in_nav_menus'   => true,
'supports'            => array('title', 'editor', 'thumbnail', 'comments', 'page-attributes','excerpt'),
'show_in_rest' =>true,
 )
);

THE Taxonomy

register_taxonomy(
'portfoliocat',
'portfolio',
 array(
 'hierarchical'      => true,
 'show_in_nav_menus' => true,
'labels'            =>array(),
 'query_var'         => true,
 'rewrite'           => array('slug' => 'portfoliocat'),
 'show_in_rest' => true,
    )
  );

Changing the slug of taxonomy works for me. Don't know the reason behind it but it works.


I can reproduce this as well. Adding show_in_rest in register_taxonomy function, as suggested by many, would normally be proper answer, but not full answer in your case. This is because rest endpoint types is already in use by Wordpress itself. https://example.com/wp-json/wp/v2/types will return registered post types and therefore Gutenberg does not understand it. See https://developer.wordpress.org/rest-api/reference/post-types/

Thus, changing slug is probably the best way to go. If your site is live, then you might want to consider some rewrite rules so SEO won't take hit.

Still, even if you change the slug, you need to add show_in_rest as well when using Gutenberg.