AtmiyaDas2014
AtmiyaDas2014

Reputation: 300

any way to remove Filters from post admin page?

On a custom post type, I want to remove the filters that show up on /edit.php (where all of the posts are listed out).

I have a custom taxonomy that shows up as a filter that I want to keep, but I want to remove the 'Show all dates' and 'View all categories' filters.

Any ideas?

Upvotes: 0

Views: 1299

Answers (1)

user3868009
user3868009

Reputation:

This is a very similar question to the one you posted here: How to hide everything in publish metabox except Move to Trash & Publish button Please check my answer. You would simply need to add the IDs of the elements you wish to hide.

You can traverse the DOM to target the elements you need:

posts-filter .tablenav select[name=m],
posts-filter .tablenav select[name=cat],
posts-filter .tablenav #post-query-submit{
    display:none;
}

Upvotes: 1

Related Questions