Taxonomy loop with post loop inside (but pulling another taxonomy)?

Is it not possible to do a taxonomy loop, and then have a post loop inside of that (but the post loop is filtered by a second taxonomy? Example:

<Loop type=taxonomy_term taxonomy=location_state>
    <h2><Field title /></h2>
    <Loop type=store taxonomy=rewards terms="{Field id}">
        <a href="{Field url}"><Field title /></a>
    </Loop>
</Loop>

This should output the titles of each taxonomy term with the posts inside that term. But then it should only output posts that also have a taxonomy of rewards. No?

It isn’t outputting any posts at all - only the tax titles

Hi Zack,
So I think the problem here is that you’re using a single taxonomy parameter on your post loop, and you’re passing the taxonomy ID from a different taxonomy to your parameter, which wouldn’t match a reward term. I think something like this would solve your problem:

<Loop type=taxonomy_term taxonomy=location_state>
    <h2><Field title /></h2>
    <Loop type=store taxonomy=location_state terms="{Field id}" taxonomy_2=rewards taxonomy_compare_2=exists terms_2="">
        <a href="{Field url}"><Field title /></a>
    </Loop>
</Loop>

Post loops support up to 3 taxonomy comparisons, with the second and third requiring a _2 and _3 appended to each parameter.

Each taxonomy comparison is limited to a single taxonomy, and the term IDs or names passed to the terms parameter needs to match a term in the tax specified in the taxonomy parameter.

That’s great. I had no idea you could pass it more than one taxonomy comparison!