Home › Forums › ACF PRO › Searching for a Relationship Match in Sub-Query › Reply To: Searching for a Relationship Match in Sub-Query
I can’t help you much with the query to directly query the DB. That would be over my head. I could probably figure it out but I prefer easier solutions.
For something like this I would create an acf/save_post action. In my filter I would get the values from the related posts that I want to base a search on and store them in WP custom fields connected to the posts I want to search. Here is an only explanation of doing that https://web.archive.org/web/20190814230622/https://acfextras.com/dont-query-repeaters/. The link deals with repeater fields but it can easily be applied to this case as well.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.