Add multiple taxonomy filters to edit.php that support search

After reading through this fantastic tutorial by Mike Schinkel:

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

Read More

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

Related posts

Leave a Reply

1 comment

  1. 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;
            }
        }
    }
    add_filter('parse_query','override_is_tax_on_post_search');