title: ACF repeater field - If one row, show a static image
body: <p>I have an ACF repeater field which pulls in images to an image slider.</p>
  
  <p>if the user uploads just the one image the slider breaks. </p>
  
  <p>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)</p>
  
  <p>here is my code so far: </p>
  
  
  
  <pre><code>    &lt;div class="full-img-slider"&gt;
  
          &lt;?php while( have_rows('top_images') ): the_row(); 
  
              $image = get_sub_field('image');
  
              ?&gt;
  
                  &lt;img src="&lt;?php echo $image; ?&gt;"&gt;
  
              &lt;?php endwhile; ?&gt;
  
      &lt;/div&gt;
      &lt;!-- Close full image slider --&gt;
  
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>is there a way of saying if over 2 rows echo this? </p>
  
  <p>I am not very PHP savvy.</p>