Home › Forums › Add-ons › Repeater Field › Post object field inside repeater field › Reply To: Post object field inside repeater field
Hi @sonnenschauer,
Please try out the following code as the basis of implementation which I’ve tested on my end:
<?php if ( have_rows( 'translation_translator' ) ) : ?>
<?php while ( have_rows( 'translation_translator' ) ) :
the_row(); ?>
<?php
$translator_language = get_sub_field( 'translator_language' );
if ( $translator_language ) :
$post = $translator_language;
setup_postdata( $post );
?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
I hope this helps!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.