ACF:
HTML:
<div id=»bootstrap-touch-slider» class=»carousel bs-slider fade control-round indicators-line hidden-xs hidden-sm» data-ride=»carousel» data-pause=»hover» data-interval=»5000″ >
<!– Indicators –>
<ol class=»carousel-indicators»>
<?php
// check if the repeater field has rows of data
if( have_rows(‘slides’,2) ):
$ative=’active’;
$i=0;
// loop through the rows of data
while ( have_rows(‘slides’,2) ) : the_row();
echo ‘<li data-target=»#bootstrap-touch-slider» data-slide-to=»‘.$i.'» class=»‘.$active.'»></li>’;
$active = »;
$i++;
endwhile;
else :
// no rows found
endif;
?>
</ol>
<!– Wrapper For Slides –>
<div class=»carousel-inner» role=»listbox»>
<?php
// check if the repeater field has rows of data
if(have_rows(‘slides’,2) ):
$active=’active’;
$i=0;
// loop through the rows of data
while ( have_rows(‘slides’,2) ) : the_row();
$title = get_sub_field(‘titulo’,2);
$bajada = get_sub_field(‘bajada’,2);
$img = get_sub_field(‘imagen’,2);
$img_url = $img[‘sizes’][‘slides’];
echo ‘<div class=»item ‘.$active.'»>’;
echo ‘<img src=»‘.$img_url.'» class=»img-responsive hidden-xs hidden-sm» alt=»‘.$title.'»>’;
echo ‘<div class=»bs-slider-overlay»></div>’;
echo ‘<div class=»container»>’;
echo ‘<div class=»row»>’;
echo ‘<div class=»slide-text slide_style_left»>’;
echo ‘<h1>’.$title.'</h1>’;
echo ‘<p>’.$bajada.'</p>’;
echo ‘</div>’;
echo ‘</div>’;
echo ‘</div>’;
echo ‘</div>’;
$active = »;
$i++;
endwhile;
else :
// no rows found
endif;
?>
</div><!– End of Wrapper For Slides –>
<!– Left Control –>
<a class=»left carousel-control» href=»#bootstrap-touch-slider» role=»button» data-slide=»prev»>
<span class=»fa fa-angle-left» aria-hidden=»true»></span>
<span class=»sr-only»>Previous</span>
</a>
<!– Right Control –>
<a class=»right carousel-control» href=»#bootstrap-touch-slider» role=»button» data-slide=»next»>
<span class=»fa fa-angle-right» aria-hidden=»true»></span>
<span class=»sr-only»>Next</span>
</a>
</div> <!– End bootstrap-touch-slider Slider –>
0 Reviews