Support

Account

Home Forums Add-ons Repeater Field FOR EACH Inside of an IF/ELSE using Select Field/Repeater Reply To: FOR EACH Inside of an IF/ELSE using Select Field/Repeater

  • 
    
    <section id="testimonial-slideshow"<?php 
        if ($section['background_image_or_color'] == 'Image') {
          ?> class="background-cover" style="background-repeat: no-repeat; background-image: url('<?php 
              echo $section['image']['sizes']['image-1280-460']; ?>');" data-stellar-background-ratio="0.75"<?php 
        } else {
          ?> class="<?php echo $section['background_color']; ?>"<?php 
        }
      ?>>
      <h2 class="text-center"><?php echo $section['title']; ?></h2>
      <?php 
        foreach ($section['testimonials'] as $item => $block) {
          ?>
            <div .... the rest of your code in here
          <?php 
        } // end foreach testimonial
      ?>
    </section>