I have a CPT (school
) that has an ACF relationship field (district
) and on my School Directory page I am trying to list all schools while grouped within their District. I thought I could do a simple Query Builder looper where I filter by district
equal to {{ post.id }}
like so:
Here is a screenshot of some debugging I have gone through to try to confirm I have the same values.
One of my concerns or big questions here is that I’ve noticed in ACF the return format is “Post Object” so I thought perhaps that was an issue. I prefer this so I can easily use it for Dynamic Content loopers, but I’m wondering if this is causing me issue right now. I even tried changing to “Post ID” but still not getting the results I’m expecting.
Does ACF “Post Object” return format make a difference in what is queried in the Query Builder?
How do I fetch all school
CPT post where the ACF Relationship Field has the current District in my parent looper selected?