Filter Custom Post Types By Category (Taxonomy)

I was trying to find a way to filter my custom post types by category in the admin view and was having difficulty learning how to do it. After a ton of searching I found a great snippet of code to achieve this. The only drawback is you cannot use it as an array and must copy and paste the code each time you want to use it in a post type.

To get this to work you need to paste it into your functions.php file and add your post type where it says “team” and your taxonomy for that post type where it says “group”. If you want to use this for multiple post types you need to make sure you change the function names/ids each time you copy and paste this. Full credit for this snippet goes to

Leave a Reply

Close Menu