Support

Account

Home Forums Add-ons Repeater Field Repeater not working Reply To: Repeater not working

  • They are post objets, I just fixed those:

    if( have_rows(‘cobertura’) ): ?>
    <p class=”font-arial fs-13 hint-text”>País<br>
    <?php while ( have_rows(‘cobertura’) ) : the_row();
    $myposts = get_sub_field(‘pais’);
    if( $myposts ): foreach( $myposts as $post_object):
    echo get_the_title($post_object->ID);
    endforeach;
    endif;
    echo “
    </p>”;
    endwhile;
    else :
    if ($pais != ”) { ?><p class=”font-arial fs-13 hint-text”>País<br><?php echo $pais; ?></p><?php }
    endif; ?>

    Now I have another repeater “temas” located right next to “cobertura” from where I get “temas_generales” and “temas_específicos” both are post object subfields, I did copy & paste the code for “cobertura” and change only the names of the fields, but it returns the title of the custom post type (news), any idea?