Taxonomy archive uses incorrect template when query strings are used
I have two taxonomies in use on my site, both of which have their own taxonomy archive templates with different interfaces. I use query strings to perform filtering on each of the archives. My problem is that if I use query strings on one taxonomy archive to filter by ANOTHER taxonomy, WordPress switches the taxonomy template.
For example, let's say I have a car
taxonomy and a color
taxonomy. If I want to see all sports cars I use this URL:
http://example.com/car/sports-cars/
Now, if I want to filter the results to only show all green sports cars, I use this:
http://example.com/car/sports-cars/?color=green
My expectation is that both URLs would render using taxonomy-car.php
since that's the main query, but when the query string is added suddenly WordPress starts using taxonomy-color.php
instead. The two templates are not interchangeable, so this is a problem.
Any ideas how to prevent this from happening?
Topic query-string custom-taxonomy templates Wordpress
Category Web