Wordpress acf repeater get first and second images only
<p>I'm using acf plugin on a wordpress site. I am using a repeater field with an image subfield that is displayed on a blogpost. My goal is to only get and display the first and second images from a blog post to be displayed for the homepage.</p>

<p>I tried using this code from the acf site documentation but to no avail the code is not working. Can someone know the issue?</p>

<pre><code>         &lt;?php while ($the_query -&gt; have_posts()) : $the_query -&gt;
            the_post(); 
            $postqID = get_the_ID();
          ?&gt;

          &lt;?php

          $rows = get_field('post_images', $postqID ); // get all the rows
          $first_row = $rows[0]; // get the first row
          $first_row_image = $first_row['post_image' ]; // get the sub field value 

          // Note
          // $first_row_image = 123 (image ID)

          $image = wp_get_attachment_image_src( $first_row_image, 'full' );
          // url = $image[0];
          // width = $image[1];
          // height = $image[2];
          ?&gt;
          &lt;img src="&lt;?php echo $image[0]; ?&gt;" /&gt;
</code></pre>