Support

Account

Home Forums ACF PRO Insert code between get_row_layout() Reply To: Insert code between get_row_layout()

  • Hi @marco-b

    You should be able to achieve that using this code:

    <?php if( have_rows('blocks') ):?>
        <div class="row">
            <?php while ( have_rows('blocks') ) : the_row();?>
                
                <?php if( get_row_layout() == 'full_screen' ):?>
    
                 <?php elseif( get_row_layout() == 'box' ):?>
                      
                      <div class="col-sm-3">
                          <!--content-->
                      </div>
                  
                <?php endif;?>
                
            <?php endwhile;
        </div>
    	else :

    I hope this helps.