Home › Forums › General Issues › Getting the_content() in a Relationship loop › Reply To: Getting the_content() in a Relationship loop
I was having this issue too using the Basic loop (without setup_postdata) on my blog/news page. I was using a relationship field to select some featured posts for the top of the page but get_the_content() always returned the content of my latest published post.
I over came this using the below code:
<?php $content = get_post_field('post_content', $p->ID); ?>
<p><?php echo $content; ?></p>
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.