Home › Forums › General Issues › Join posts with fields in single query › Reply To: Join posts with fields in single query
This isn’t part of what you asked, but You can use -1
for posts_per_page
to tell WP to get all of the posts
<code>posts_per_page</code> => -1,
But as far as your real question goes, no. WP_Query is not capable of doing joins to other posts through a custom field. For something like this you would need to write your own SQL query and use https://codex.wordpress.org/Class_Reference/wpdb and then write your own code to loop over and display the results.
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.