So I have two Loops. First loop is a Taxonomy loop (States
), and inside that is a Loop (Store
) for all locations inside that State (but only if they match another taxonomy - Rewards
).
<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>
But sometimes there are no items inside the second loop because not all Stores have Rewards enabled.
So how can I remove the <h2>
if its loop below it doesn’t have any results?
I’m assuming an <If>
statement of some kind but can’t quite figure out how to do it for something that lives outside of the loop you’d be checking in…