Remove All cetegories filter
-
I have added a custom filter by the
restrict_manage_posts
hook and thewp_dropdown_categories
. Below is the code:add_action ( 'restrict_manage_posts', 'custom_filters' ); function custom_filters () { global $typenow; if ( 'my_custom_post_type' !== $typenow ) { return; } wp_dropdown_categories ( array ( 'name' => 'my_custom_post_type', 'value_field' => 'name', 'show_option_all' => 'All' . ' ' . $typenow, 'taxonomy' => 'my_custom_post_type' ) ); }
But how do I hide the default ‘All categories’ and only retain the ‘All dates’ as well as my custom filter?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Remove All cetegories filter’ is closed to new replies.