After reading through this fantastic tutorial by Mike Schinkel:

Adding a Taxonomy Filter to Admin List for a Custom Post Type?

I have discovered a few issues that I need to work out. Search does not seem to work properly with custom taxonomy filters applied. Also, if I output more than one custom taxonomy filter dropdown, what's the best way to prevent a user from specifying values for more than one of the dropdowns? I'm thinking I should just add a JavaScript function, but it might have to be a dynamically generated JavaScript function.

I really want to tackle the search issue first, though.

Any thoughts? Thanks for your help, Dave Morris


Figured this out by using this code:

function override_is_tax_on_post_search($query) {
        global $pagenow;
        $qv = &$query->query_vars;
        if ($pagenow == 'edit.php' && isset($qv['taxonomy']) && isset($qv['s'])) {
            $query->is_tax = true;
  • If that's based on Mike's code, it's missing the code that switches the term id for a slug(which is required for the filter to work, unless you render the dropdown differently).. note: there's an error in your code(extra curly brace).. Your fix however, does work... :)
    – t31os
    Dec 23 '10 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.