Home › Forums › Front-end Issues › Reverse query relationship field › Reply To: Reverse query relationship field
Hi @pilgrimish
It looks like the last query in your code is the one which is related to your question, is this correct?
Within this ‘client’ loop, you will need to use the get_posts
function to see if any posts exist (‘work’) which contain a custom field value where the current ‘client’ has been selected.
Is all the rest of your code working?
If so, the additional get_posts should be quite straight forward. Please read over the doc to understand how you can use compare LIKE to find a value within a serialized array.
Thanks
E
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.