Support

Account

Home Forums Front-end Issues Problem returning post object data Reply To: Problem returning post object data

  • Yes, I’m using this inside of a loop. Adding a proper post id returns the right result.

    Now how would I get the proper post id for each item in the loop and return the title and link? I assume it would look something like:

    <?php $post_object = get_field('instructor', $post->ID); ?>
    
    <p><a href="<?php echo get_permalink($post_object->ID); ?>"><?php echo $post_object->post_title; ?></a></p>

    … but that doesn’t work.