$(document).ready(function() {
$('#media').carousel({
pause: true,
interval: false,
});
});
<?php
// check for rows (parent repeater)
if (have_rows('localidades_prov')): ?>
<?php // loop through rows (parent repeater)
while (have_rows('localidades_prov')): the_row(); ?>
<article class="localidad">
<?php the_sub_field('titulo_localidad'); ?>
<p><strong>Técnico Local:</strong>
<?php the_sub_field('tecnico_local'); ?></p><?php
// check for rows (sub repeater)
$active = "active";
if (have_rows('galeria')): ?>
<div class="carousel slide media-carousel" id="media">
<div class="carousel-inner">
// loop through rows (sub repeater)
<?php while (have_rows('galeria')):
the_row(); ?>
<div class="item <?php echo $active; ?>">
<div class="row">
<div class="col-md-12">
<img style="width: 100%"
src="<?php the_sub_field('galeria_imagen'); ?>"/>
</div>
</div>
</div>
<?php endwhile;$active = ''; ?>
<?php $active = '';endwhile; ?>
</div>
<a data-slide="prev" href="#media" class="left carousel-control">‹</a>
<a data-slide="next" href="#media" class="right carousel-control">›</a>
</div>
<?php endif; //if( get_sub_field('galeria') ): ?></article>
<?php endwhile; // while( has_sub_field('localidad') ): ?>
<?php endif; // if( get_field('localidad') ): ?>