Support

Account

Forum Replies Created

  • Don’t be mad its working a charm. Used this with OWL Carousel 2, really good.

    Only posting the PHP so you can grab it.

    // check if the repeater field has rows of data
    if( have_rows('repetidor_imagenes') ):
    
      // loop through the rows of data
        while ( have_rows('repetidor_imagenes') ) : the_row();
    
    // Start Loop
    // Grab the subfield gallery array
    //(Use the array return on ACF backend panel, you will have more control con the atts)
    $images = get_sub_field('geleria_de_imagenes');
    
    if( $images ):
    
    $output .= '<div class="vc_row wpb_row vc_row-fluid prodvar imgal-container">';
    $output .= '<div class="owlonlyfix owl-carousel owl-theme">';
    
      foreach( $images as $image ):
    
        $output .= '<div class="item imgal-img"><img src="'.$image['sizes']['thumbnail'].'" alt="'.$image['alt'].'" class="imgal-img" /></div>';
    
      endforeach;
    
    $output .= '</div></div>'; 
    
    endif; 
    // End Loop
    
        endwhile;
    
    else :
    
        // no rows found
    
    endif; ?>

    Cheers!!!

Viewing 1 post (of 1 total)