Support

Account

Forum Replies Created

  • To others who have troubles with repeater fields in flexible content

    
    <?php //Flexible content
    if( have_rows('builder') ) :
        
        while ( have_rows('builder') ) : the_row();
    
            if( get_row_layout() == 'shortcuts' ): 
                
                //Have to make the count before "have_rows"
                //else it will return false
                $count = count( get_sub_field('buttons') );
    
                //Repeater field
                if( have_rows('buttons') ) :
    
                    while ( have_rows('buttons') ) : the_row();
                    
                    endwhile;
    
                endif;
    
            endif;
    
        endwhile;
    
    endif;
Viewing 1 post (of 1 total)