I’m trying to filter a <Loop> by an ACF field. The problem is the field is inside of an ACF repeater. So I would need to do a <Loop> to get the field, and then filter by it?
Is this possible? If so, what is the correct syntax?
This is what I tried, and didn’t work, but that was to be expected:
<Loop type=listings field="supertag_id" field_compare="includes" field_value="29">
<div><Field title /></div>
</Loop>
Do I have to do an initial query inside of a <Set> to then use in the real <Loop> or something to that effect?
I don’t think it’s possible to do the <Set> thing the more I think about it. That is just going to return all posts with their supertag_id but I still won’t be able to filter by it…
Does the filtering need to happen within the loop itself? Don’t have time to test it but I wonder if an approach like this would work. Obviously not very pretty and potentially not the most efficient if you’ve got a lot of data, but I imagine this approach would work.