Support

Account

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>