Home › Forums › ACF PRO › add related content to get_posts query › Reply To: add related content to get_posts query
There isn’t any way to do this directly in a single query. You need to first do the query that you’re doing. Then loop through the results of that query to get the related posts from the acf fields and then do either merge those results into the results of the first query or collect all the post IDs of the first query and from getting the related posts and do another query using that list.
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.