Last active
August 29, 2015 14:08
-
-
Save dboutote/af1025196291abc6408a to your computer and use it in GitHub Desktop.
Remove the category taxonomy drop down from the posts lists table in WordPress Admin (edit.php)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove the category taxonomy drop down from the posts lists table | |
* | |
* @param string $output The resulting HTML to build the select dropdown | |
* @param array $r The array of arguments to build the select dropdown | |
* | |
* @return string $output The filtered HTML of the dropdown | |
*/ | |
function db_remove_category_dropdown($output, $r ){ | |
global $pagenow; | |
if( 'category' === $r['taxonomy'] && 'edit.php' === $pagenow ){ | |
$output = ''; | |
} | |
return $output; | |
} | |
add_filter('wp_dropdown_cats', 'db_remove_category_dropdown', 0, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment