Home › Forums › Front-end Issues › Reverse query relationship field › Reply To: Reverse query relationship field
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.
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’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.