Does anyone have sample code for removing a metabox from the edit page?
I created a custom taxonomy for my CPT and then embedded that taxonomy into the ACF form, so I want to remove the associated metabox from the edit page.
I can’t find any sample code for accomplishing that.
Thanks!
Found it!
/* Remove Custom Taxonomy Meta Boxes */
function dads_remove_tax_meta() {
remove_meta_box( 'ad-zonesdiv', 'post', 'side' );
}
add_action( 'admin_menu' , 'dads_remove_tax_meta' );
Correction:
/* Remove Custom Taxonomy Meta Boxes */
function dads_remove_tax_meta() {
remove_meta_box( 'ad-zonesdiv', 'digital-ads', 'side' );
}
add_action( 'add_meta_boxes' , 'dads_remove_tax_meta' );
“add_meta_boxes” is the better action to capture and post removes it from all post types while I can specify the post type directly.