Hello,
I have a repeater field called “anime_par”, with sub_field called “animateur”.
I’m using this inside a loop in my page, a loop that displays posts from a category inside a custom post type.
what I’m trying to do is to display the post name and post link of the “animateur” selection inside my page.
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.
<?php while(has_sub_field('anime_par')): ?>
<a href="<?php echo get_permalink('the_sub_field("animateur")'); ?>"><?php echo get_title('the_sub_field("animateur")'); ?></a>
<?php endwhile; ?>
can anybody help me with this ?
thanks a lot