title: No Results from ACF Repeater Field
body: <p>I have a WordPress site with the ACF repeater field installed. I have followed the video tutorials down to a t and have tried every version of the template code examples on the site but I can't get anything to display at all, nothing.</p>
  
  <p>My repeater field name 'carousel_images' and it has 3 sub fields, 'image', 'headline' and 'text'.</p>
  
  <p>Can anyone help? I just want to display these fields on the front-end on my homepage, which is a static page using the 'front-page.php' template.</p>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>&lt;?php if(get_field('carousel_images')): ?&gt;
      &lt;div&gt;
          &lt;?php while(has_sub_field('carousel_images')): ?&gt;
              &lt;img src="&lt;?php the_sub_field('image'); ?&gt;"&gt;
              &lt;div class="caption"&gt;
                  &lt;h3&gt;&lt;?php the_sub_field('headline'); ?&gt;&lt;/h3&gt;
                  &lt;p&gt;&lt;?php the_sub_field('text'); ?&gt;&lt;/p&gt;
                  &lt;a href="#" class="hero-button" data-reveal-id="loginModal"&gt;Login &lt;span&gt;&lt;i class="fa fa-user"&gt;&lt;/i&gt;&lt;/span&gt;&lt;/a&gt;
                  &lt;a href="#" class="hero-button" data-reveal-id="registerModal"&gt;Register &lt;span&gt;&lt;i class="fa fa-check-square"&gt;&lt;/i&gt;&lt;/a&gt;
              &lt;/div&gt;
          &lt;?php endwhile; ?&gt;
      &lt;/div&gt;
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p><strong>EDIT 1</strong>
  My repeater field was inside of a custom post type so I had to use the WP_Query to display the custom post type before I tried to display the repeater field. Amended working code below.</p>
  
  <p>Thanks again.</p>
  
  <pre><code>&lt;?php
  
      $args = array(
          'post_type' =&gt; 'home_carousel_image'
      );
  
      $the_query = new WP_Query( $args );
  ?&gt;
  
  
  &lt;!-- WP_Query WordPress loop --&gt;
  &lt;?php if ( have_posts() ) : while ( $the_query-&gt;have_posts() ) : $the_query-&gt;the_post(); ?&gt;
  
      &lt;?php if(get_field('carousel_images')): ?&gt;
          &lt;?php while(has_sub_field('carousel_images')): ?&gt;
          &lt;div&gt;
              &lt;img src="&lt;?php the_sub_field('image'); ?&gt;"&gt;
              &lt;div class="caption"&gt;
                  &lt;h3&gt;&lt;?php the_sub_field('headline'); ?&gt;&lt;/h3&gt;
                  &lt;p&gt;&lt;?php the_sub_field('text'); ?&gt;&lt;/p&gt;
                  &lt;a href="#" class="hero-button" data-reveal-id="loginModal"&gt;Login &lt;span&gt;&lt;i class="fa fa-user"&gt;&lt;/i&gt;&lt;/span&gt;&lt;/a&gt;
                  &lt;a href="#" class="hero-button" data-reveal-id="registerModal"&gt;Register &lt;span&gt;&lt;i class="fa fa-check-square"&gt;&lt;/i&gt;&lt;/span&gt;&lt;/a&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;?php endwhile; ?&gt;
      &lt;?php endif; ?&gt;
  
  &lt;?php endwhile; else: ?&gt;
  
      &lt;!-- Displayed if no posts or pages are available --&gt;
      &lt;p&gt;There are no posts or pages here!&lt;/p&gt;
  
  &lt;?php endif; ?&gt;
  </code></pre>