Support

Account

Home Forums Add-ons Repeater Field Repeater not display in front end Reply To: Repeater not display in front end

  • Hey guys, Solved the problem.

    Dan’s question about the repeater being on this page or somewhere else made things click. The repeater is actually on the options page, so reading that documentation helped figure out what was wrong.

    I would suggest putting a options page example on the repeater documentation, to help others that hit the same problem.

    Cheers for the help guys!

    <div class="stats allignfull">
        <div class="wp-block-columns has-6-columns">
    
    <?php 
        
        if( have_rows('stat_repeater', 'option') ):
            while( have_rows('stat_repeater', 'option') ): the_row(); 
        ?>
    
    <div class="wp-block-column">
                <div class="wp-block-classic align">
    
                <p> 
    <?php $image = get_sub_field('stat_image', 'option');
    $size = 'thumbnail'; // (thumbnail, medium, large, full or custom size)
    if( $image ) {
        echo wp_get_attachment_image( $image, $size );
    }?></p>
           
            <p class="headline">
                <span class="font-color-blue-dark"><strong><?php echo get_sub_field('stat_headline'); ?></strong></span>
            </p>
            <p class="center-text"><?php echo get_sub_field('stat_text'); ?></p>
     </div>
             </div>
    
    <?php endwhile;
    
    else :?>
    
    no rows found
    <?php
     endif; ?>
    
        </div>	
    </div>