title: Using post object inside ACF repeater field
body: <p>I'm using Advanced Custom Fields on my website.</p>
  
  <p>I have a repeater field called anime_par, with sub_field called animateur. Sub field animateur is a post-object.</p>
  
  <p>I’m using this inside a loop in my page, a loop that displays posts from a category inside a custom post type.</p>
  
  <p>What I’m trying to do is to display the post name and post link of the animateur selection inside my page.</p>
  
  <p>Here is the code I’m using but it’s not working, it displays the permalink of my current page, not the one selected in the custom field.</p>
  
  <pre><code>&lt;?php while(has_sub_field('anime_par')): ?&gt;
  
  &lt;a href="&lt;?php echo get_permalink('the_sub_field("animateur")'); ?&gt;"&gt;&lt;?php echo get_title('the_sub_field("animateur")'); ?&gt;&lt;/a&gt;
  
  &lt;?php endwhile; ?&gt;
  </code></pre>
  
  <p>Any suggestions to make this work?</p>
  
  <p>thanks for your help,</p>