How can I output just the first row of a Repeater filed, giving that this is my code?
<?php if ( have_rows( 'gallery' ) ) : ?>
<?php while ( have_rows( 'gallery' ) ) : the_row(); ?>
<?php the_sub_field( 'image' ); ?>
<?php endwhile; ?>
<?php else : ?>
<?php // no rows found ?>
<?php endif; ?>
I would like to display just the first image in an <img>
tag. So something like <img src="IMAGE URL COMES HERE">