Support

Account

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.