Since in this case i’m using ACF to define the taxonomies for a custom post type, I wanted to remove the metabox in the sidebar. Luckily, there’s no custom code required for this. We just need to set meta_box_cb
to false.
register_taxonomy("{$this->post_type}-type", $this->post_type, array(
'label' => "{$this->label} Types",
'public' => true,
'show_admin_column' => true,
'hierarchical' => true,
'meta_box_cb' => false,
));
Did you know about show_admin_column
as well? This argument allows you to show or hide the taxonomy column that’s visible on the overview of all (custom) posts!
How about the Gutenberg/Block editor?
Arnaud Banvillet seems to have the solution for that, see his Github comment for more information: https://github.com/WordPress/gutenberg/issues/13816#issuecomment-470137667
In the same topic, Florian Schroiff suggested another fix; https://github.com/WordPress/gutenberg/issues/13816#issuecomment-1479537422
Florian says
Doesn’t work if you use Gutenberg ๐
Marinus Klasen says
Hey Florian, this comment on Github should help; https://github.com/WordPress/gutenberg/issues/13816#issuecomment-470137667