Filters
You can set what dropdown filters appear on the post type admin edit screen by passing an array of taxonomy names to the filters() method.
1
$books->filters( [ 'genre', 'category' ] );
Copied!
The order the filters appear are set by the order of the items in the array.
1
// Display the category dropdown first.
2
$books->filters( [ 'category', 'genre' ] );
Copied!
An empty array will remove all dropdown filters from the admin edit screen.
1
// Don't display filters on the admin edit screen.
2
$books->filters( [] );
Copied!
Last modified 3yr ago
Copy link