Removing CPT-onomy Meta Boxes From Admin

Remove the CPT-onomy meta box from the admin “edit post” page by returning false to the following filter.

Some need-to-knows about filters:

  • To use this filter, tweak the code below and add it to your functions.php file.
  • If a filter accepts more than one argument, you have to declare the number of arguments in your add_filter() declaration, along with the filter’s priority.
  • All filters MUST return a value, i.e. the value being filtered.
  • For more information, check out add_filter() in the WordPress codex.
add_filter( 'custom_post_type_onomies_add_cpt_onomy_admin_meta_box', 'my_website_add_cpt_onomy_admin_meta_box', 1, 3 );
function my_website_add_cpt_onomy_admin_meta_box( $add_cpt_onomy_meta_box, $taxonomy, $post_type ) {
   if ( $taxonomy == 'actors' )
      return false;
   return $add_cpt_onomy_meta_box;