Removing Meta Box of Custom Taxonomy in CPT
-
Hi!
I’m having an issue with removing a custom taxonomy meta box from our edit page.
The code i’m using is below, but nothing is happening. Is there something I’m missing, or another way to do this?
I still want to see the taxonomy in the side menu, so just using the ‘show ui = false’ won’t work.I’ve tried:
function sb_remove_trackbacksdiv(){ remove_meta_box( 'product-category', 'business', 'normal' ); } add_action( 'admin_menu', 'sb_remove_trackbacksdiv' )
and
function sb_remove_taxonomy_box() { $slug = 'product-category'; // this is custom taxonomy slug $post_type = 'business'; // custom post type remove_meta_box( $slug.'div', $post_type, 'side' ); } add_action( 'admin_menu', 'sb_remove_taxonomy_box' );
My cpt is ‘business’ and the taxonomy slug is ‘product-category’.
Its Hierarchical as well.
And i’m on the Roots/Sage theme.Any help would be great.
Thanks!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Removing Meta Box of Custom Taxonomy in CPT’ is closed to new replies.