I am using some custom code in my functions.php to create a new custom taxonomy and then hoping to be able to create new and pick existing tags inside this custom taxonomy when editing a page. I have Gutenberg running and have got the 'show_in_rest' => true, code included already...

Currently things are working 90% as I need them, in that the new custom taxonomy appears in Wordpress and I can add new tags within it as an item listed under the PAGES area in the main LHS nav. The custom taxonomy panel also appears in the RHS sidebar when editing a page, but.. what is not working, is that none of the tags that sit into this custom taxonomy appear in this panel, and I cant set new ones... Can you advise what I am missing to get this to work please?

Current code is:

add_action( 'init', 'pages_tax' );
function pages_tax() {
    'Rocker categories',

        'label' => __( 'Rocker categories' ),
        'rewrite' => array( 'slug' => 'Rocker categories' ),
        'hierarchical' => true,
        'show_in_rest' => true,

         'show_in_nav_menus' => true,
         'query_var'         => true,

         'public' => true,

         'labels' => $labels,
         'publicly_queryable' => true,
         'show_ui' => true,
         'show_tagcloud' => true,
         'rewrite' => true


The issue seems local to Gutenberg I feel, as if I QUICK EDIT the page, I can set the custom taxonomy tags from that view, just not from the main edit view... ??? (Of course on QUICK EDIT you also cant ADD a new tag - so have to do that in the main LHS nav...)

  • This is 100% down to Gutenberg - just disabled it and this all works just fine... – dubbs Oct 1 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.