I know this has been asked before, I have searched all over the internet and encountered several people with similar problem and some of them with solutions (none of those solutions worked for me, obviously). Here's how I'm registering my custom taxonomy (labels not included for simplicity):
register_taxonomy( 'location', array( 'restaurant' ), array(
'labels' => $labels,
'public' => true,
'hierarchical' => true,
'show_ui' => true,
'query_var' => true,
'show_in_nav_menus' => true,
'show_admin_column' => true,
'show_in_rest' => true, // Needed for tax to appear in Gutenberg editor.
'rewrite' => array( 'slug' => 'location' ),
));
I don't know if it is related, but here is how I'm registering the Custom Type Post (again, labels not included for simplicity):
$args = array(
'labels' => $labels,
'description' => __( 'Descripción.', 'text-domain' ),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_rest' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'restaurant' ),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'taxonomies' => array('location'),
'menu-icon' => 'dashicons-format-gallery',
'menu_position' => 5,
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
);
register_post_type( 'restaurant', $args );
Wraping up: I can use the taxonomies normally outside of Gutenberg and I can see the tab in the document panel in Gutenberg, but taxonomies are not showing up there and also the Add new location button inside Gutenberg does not work
Thanks for your help