I’ve created a custom post type with a main metabox and two custom taxonomies in my functions.php
. To create the taxonomies I used register_taxonomy()
.
In the custom post’s main metabox, I manage my taxonomies, i.e. I tick some checkboxes. So I don’t need the side-bar metaboxes anymore, I want to get rid of them, just as if I had their names unticked in the screen options.
Still, I want the taxonomies to appear in the left admin panel, associated to the custom post type I’ve created.
I tried remove_meta_box()
but it has no effect. I tried to play with show_ui
and show_in_menu
: if the former is set to true and the latter to false, I have the metaboxes but the taxonomies disappear from my admin sidebar, so it is exactly the opposite of I want to do !
How can this be solved ? thanks
I had a similar issue recently, and found that
remove_meta_box()
worked, but it had to be hooked by theadmin_menu
action.For example:
Solved, I misformed the target metabox to hide. The
div
tag must be contatenated to the name of the metabox, after it :where
mycustompost
is the custom post type, andmymeta
is the custom taxonomy.