Removing The CPT-onomy Admin Dropdown Filter

Remove the CPT-onomy’s dropdown filter from the admin manage custom post type screen 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.
<?php
add_filter( 'custom_post_type_onomies_add_cpt_onomy_admin_dropdown_filter', 'my_website_add_cpt_onomy_admin_dropdown_filter', 1, 3 );
function my_website_add_cpt_onomy_admin_dropdown_filter( $add_dropdown_filter, $taxonomy, $post_type ) {
   if ( $taxonomy == 'directors' && $post_type == 'movies' )
      return false;
   return $add_dropdown_filter;
}
?>