Support

Account

Home Forums Add-ons Repeater Field All images from repeater Reply To: All images from repeater

  • Hi @alekspvn

    I’m not sure I am 100% clear on what is being asked, but I am going to do my best to help. I may need more clarification.

    The Image field can return an Array, a URL, or an ID for each image, so it largely depends on which choice you made as the Return Value how you write the code.

    Since Array is the default return value, I will show code for that below:

    I am guessing you need help with the code between the ‘div’ with the ‘panel’ and ‘multiple-items’ classes, so here goes…

    
    <?php
    if ( have_rows('photo_slider') ) {
      while ( have_rows('photo_slider') ) {
        the_row();
        $slide_photo = get_sub_field('add_photo');
        if ( !empty($slide_photo) ) {
    ?>
    <img src="<?php echo $slide_photo['url']; ?>" alt="<?php echo $slide_photo['alt']; ?>" />
    <?php
        }
      }
    }
    ?>
    

    Is that what you are looking to achieve? I will get an email alert with your reply, and will help further if need be!