最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Categories does not show Block editor Wordpress

programmeradmin3浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论