Support

Account

Home Forums Add-ons Repeater Field Repeater field doesn't work with Flexslider Reply To: Repeater field doesn't work with Flexslider

  • Hi @jeffelizaga

    In this case, you need to count the total item of the slide and only show the tags if it’s not the last item in the slider like this:

    <?php if(get_field('portfolio_items')) : ?>
    <div id="portfolioSlider">
    <ul class="slides">
        <?php 
        $i = 0;
        $max_item = count(get_field('portfolio_items'));
        ?>
        <li>
            <?php while(has_sub_field('portfolio_items')) : $i++; ?>
            
                <div class="col-md-4 wp4">
                  <div class="overlay-effect effects clearfix">
                        <div class="img">
                          <img src="<?php the_sub_field('portfolio_item_image')['url']; ?>" alt="<?php the_sub_field('portfolio_item_image')['alt']; ?>">
                          <div class="overlay">
                            <a href="#" class="expand"><i class="fa fa-search"></i><br>View More</a>
                            <a class="close-overlay hidden">x</a>
                          </div>
                        </div>
                    </div> <!-- END .overlay-effect .effects .clearfix -->
                  <h2><?php the_sub_field('porfolio_item_title'); ?></h2>
                  <p><?php the_sub_field('portfolio_item_description'); ?></p>
                </div> <!-- END .col-md-4 .wp4 -->
              
                <?php if ($i % 3 == 0 && $i != $max_item){ ?>
                </li><li>
                <?php } ?>
        
            <?php endwhile; ?>
        </li>
    </ul> <!-- END .slides -->
    </div> <!-- END .portfolioSlider -->
    <?php endif; wp_reset_postdata(); ?>

    I hope this helps.