In two-category searches, where does WordPress save the title of the 2nd category?

Okay, I managed to track down the answer, with help from the “Debug This” plugin and investigating the coding of the “Beautiful Taxonomy Filters” plugin.

So far as I can find, WordPress saves full details (including Title, ID and Slug) of only the first taxonomy and first term queried.

For any additional terms or taxonomies queried, WordPress saves only the slug.

This info is located within the gob of information in $wp_query, which can be pulled out like so:

$queried_taxonomies = $wp_query->tax_query->queries;

The slugs of all queried taxonomies will be found in:


Where X is the number of the taxonomy, starting from 0.

The slugs of all queried terms are in:


Where X is as above and Y is the number of the term queried for that taxonomy, starting at 0.

So for example if the query was of two terms of one taxonomy, the slug of the second term will be in:


And if you queried one term each of two taxonomies, the slugs of the second taxonomy and term will be in: