Support

Account

Home Forums Front-end Issues Repeated Relationship Fields and $post Reply To: Repeated Relationship Fields and $post

  • Hi @Will

    If $internals is an array of posts, then the get_sub_field function is working correctly. Perhaps the issue lies in the setup_postdata funciton which can cause many problems wiht the global $post object.

    Try this instead:

    
    $internals = get_sub_field('internal_link');
    foreach($internals as $p): ?>
    <a href="<?php echo get_permalink( $p->ID ); ?>">