0

Gutenberg does not show our custom taxonomies in the editor sidebar. They have always been there using the classic editor. I have addressed the usual suspects (see below) but had no luck. Here is what I've tried:

  • added "show_in_rest" => true to the $args
  • added "public" => true to the $args
  • switched off all plugins (to ensure it is not caused by any of them)
  • switched back to the old editor via "classic editor" plugin (then they appear again immediately)
  • ensured I don't use a reserved word

Here is the code I use to generate the taxonomy - if you have any advice, I would be more than happy to hear your thoughts.

thanks

Jan

$labels = array(
    'name' => _x('Jahreszeiten', 'taxonomy general name', 'mysite'),
    'singular_name' => _x('Jahreszeit', 'taxonomy singular name', 'mysite'),
    'search_items' => __('Jahreszeiten durchsuchen', 'mysite'),
    'all_items' => __('Alle Jahreszeiten', 'mysite'),
    'parent_item' => __('Übergeordnete Jahreszeit', 'mysite'),
    'parent_item_colon' => __('Übergeordnete Jahreszeit:', 'mysite'),
    'edit_item' => __('Jahreszeit bearbeiten', 'mysite'),
    'update_item' => __('Jahreszeit aktualisieren', 'mysite'),
    'add_new_item' => __('Neue Jahreszeit hinzufügen', 'mysite'),
    'new_item_name' => __('Neue Jahreszeit', 'mysite'),
    'menu_name' => __('Jahreszeit', 'mysite'),
);

$rewrite = array(
    'with_front' => false,
    'hierarchical' => true,
    'slug' => __('jahreszeit', 'mysite'),
);

$args = array(
    'hierarchical' => true,
    'labels' => $labels,
    'show_ui' => true,
    'show_in_rest'      => true,
    'show_admin_column' => true,
    'query_var' => true,
    'rewrite' => $rewrite,
);

register_taxonomy('jahreszeit', array('post', 'pages'), $args);

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.