Also check out: Using PHP Lambda Functions with WordPress add_action() and add_filter() Functions There are 2 hooks necessary to 1) create the drop down, and 2) to filter the actual query to show the results. With 1 taxonomy, it doesn’t really matter, but the more taxonomies you have and want filterable in the WordPress admin, the more copying and pasting the same functions over and over will happen. Here’s a solution that creates a reusable function where you pass in the $post_type and $taxonomy slug. To my knowledge, all you need is to be running PHP 5.3 or newer on your server.

In this case, my post type is Resource, and that was created with the Types WordPress plugin – but it could have also been created with Pods, or another similar plugin, or written directly into your functions.php file. In the project I am working on, Resource Type and Data Format are custom taxonomies, and those are their slugs that are sent.

Let me know if you use this and find it helpful!

Share story

TJ Nevis

Expert at knowing a little bit about everything - or so I like to think. Husband, business owner, web developer, car enthusiast, animal lover, tinkerer. I run a web development/technology company, NevisTechnology.com where I'm living my dream. Need hosting services, a website, blog, Blogger to WordPress conversion or an e-commerce store?Let's talk!