Home › Forums › General Issues › Custom Post Type Relationship Archive Page › Reply To: Custom Post Type Relationship Archive Page
You can access your content within the loop via get_field ('field_slug');
. So when you get your “relationship” via get_field ()
, you have access to the content.
The loop should look like this:
// check if entries exists
if( have_posts() ):
// loop start
while( have_posts() ): the_post();
// YOUR FIELD
// loop end
endwhile;
// reset query
wp_reset_postdata();
// end
endif;
You can check the contents of the field with print_r( get_field('field_slug') );
.
Some Links:
get_field
wp_query
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.