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

    It means that you need to show the closing and opening </li><li> tag every third entry. It should be something like this:

    <?php if(get_field('portfolio_items')) : ?>
    <div id="portfolioSlider">
    <ul class="slides">
        <?php $i = 0; ?>
        <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){ ?>
                </li><li>
                <?php } ?>
        
            <?php endwhile; ?>
        </li>
    </ul> <!-- END .slides -->
    </div> <!-- END .portfolioSlider -->
    <?php endif; wp_reset_postdata(); ?>

    This page should give you more idea about it: http://stackoverflow.com/questions/936242/php-how-do-you-determine-every-nth-iteration-of-a-loop.

    Hope this helps.