Support

Account

Home Forums Front-end Issues Nested Post Object Fields Reply To: Nested Post Object Fields

  • Try to persist your object->ID always, try something like:

    
    <?php
    if(have_rows('my-repeater', mypostfather->ID) :
    while(have_rows('my-repeater', mypostfather->ID) : the_row();
    $my-son-object = get_sub_field('my-relational-post-object-field'); //return your related-post 
    $my-son-values = get_field('my-son-acf-value', $my-son-object->ID);
    endwhile;endif;
    ?>
    

    I think that your wp_reset_postdata($venue) is causing the problem.
    I don’t use setup_post_data on custom-post-type-objects like $video, $venue, $etc