Support

Account

Home Forums ACF PRO Query relationship field inside WP_Query loop Reply To: Query relationship field inside WP_Query loop

  • a relationship field can be set up to return post objects. The field should be returning a list of posts and you can access the values of those posts without have_posts. Each post in the returned array will have, in your case, $p->ID, which is the ID of the post. Using that ID you can get the value of an ACF field or other information about that post without the need of a have_posts() loop.