I have an ACF repeater field which pulls in images to an image slider.
if the user uploads just the one image the slider breaks.
So i need to count the repeater fields and then show two outputs.. One as a slider and one as a static image (if only one row)
here is my code so far:
<div class="full-img-slider">
<?php while( have_rows('top_images') ): the_row();
$image = get_sub_field('image');
?>
<img src="<?php echo $image; ?>">
<?php endwhile; ?>
</div>
<!-- Close full image slider -->
<?php endif; ?>
is there a way of saying if over 2 rows echo this?
I am not very PHP savvy.