title: Post Objects within repeater field (WordPress ACF)
body: <p>I'm working with <strong><a href="http://www.advancedcustomfields.com/" rel="nofollow">ACF</strong></a> in <strong>WordPress</strong>.</p>
  
  <p>I have a custom post type called <code>Projects</code>. Within there the user has the option to upload <strong>2</strong> featured images through an ACF repeater field. </p>
  
  <p>Now, on the home page I've given the user the option to select <strong>8 Post Object's</strong> from the <strong>Projects post type</strong>. </p>
  
  <p>I need to be able to loop through this home page repeater field, and <strong>pull out both featured images</strong> and <strong>the project title</strong> from <strong>each 'project' post object</strong>.</p>
  
  <p>ACF has recently depreciated the <code>repeater_field</code> function which I think it throwing me off here.</p>
  
  <p>But, here's what I've been trying to work with so far:</p>
  
  <pre><code>&lt;!-- check for repeater field --&gt;
  &lt;?php if(get_field('featured-projects')): ?&gt;
  
      &lt;?php while(has_sub_field('featured-projects')): ?&gt;
  
          &lt;!-- get project post objects --&gt;
          &lt;?php $projects = get_sub_field('project'); ?&gt;
  
          &lt;!-- without the loop below, this echo's all 8 projects ID's --&gt;
          &lt;?php echo($projects-&gt;ID); ?&gt;&lt;br /&gt;
  
          &lt;!-- when added, only pulls the first project. And limits the echo above to the first ID --&gt;
          &lt;?php $loop = new WP_Query( array( 
              'post_type' =&gt; 'projects',
              'p' =&gt; $projects-&gt;ID
          ) ); ?&gt;
  
          &lt;?php while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;
  
              &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;
  
  
          &lt;?php endwhile; ?&gt;
  
  
      &lt;?php endwhile; ?&gt;
  
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>I've tried to comment the code, but if anything does't make sense, let me know.</p>