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 badges1 Answer
Reset to default 0I solved the issue
I forgot the line 'show_in_rest'=> true, in the register taxonomy code.
本文标签: phpCategories does not show Block editor Wordpress
版权声明:本文标题:php - Categories does not show Block editor Wordpress 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744610185a2615607.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论