admin管理员组

文章数量:1394062

I changed my wordpress plugin from the old editor to the new block editor. Everything works fine but my categories meta box is gone.

For my plugin I created a custom taxonomy with this code

<?php
function create_scooter_tax() {
    register_taxonomy(
        'scooter_type',
        'scooters', 
        array(  
            'label' => __( 'Categorieën' ),
            'rewrite' => array( 'slug' => 'scooter' ),
            'hierarchical' => true,
        )   
    );
}
    add_action( 'init', 'create_scooter_tax' );
?>

Is there somebody who knows this issue?

I changed my wordpress plugin from the old editor to the new block editor. Everything works fine but my categories meta box is gone.

For my plugin I created a custom taxonomy with this code

<?php
function create_scooter_tax() {
    register_taxonomy(
        'scooter_type',
        'scooters', 
        array(  
            'label' => __( 'Categorieën' ),
            'rewrite' => array( 'slug' => 'scooter' ),
            'hierarchical' => true,
        )   
    );
}
    add_action( 'init', 'create_scooter_tax' );
?>

Is there somebody who knows this issue?

Share Improve this question asked Apr 1, 2020 at 9:40 JopJop 1279 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I solved the issue

I forgot the line 'show_in_rest'=> true, in the register taxonomy code.

本文标签: phpCategories does not show Block editor Wordpress