Home › Forums › Add-ons › Repeater Field › Return one row of nested repeater sub_fields › Reply To: Return one row of nested repeater sub_fields
Yeah for solutions!
http://stackoverflow.com/questions/21135959/get-first-row-image-of-acf-repeater-field
My Code
<?php $first_mm_stats = true; ?
<?php while ( $first_mm_stats && have_rows('mm-stats') ) : the_row(); ?>
<?php $first_article_stat = true; ?>
<?php while ( $first_article_stat && has_sub_field('article_stat') ): ?>
<h4><?php the_sub_field('name'); ?></h4>
<div class="stat-box" rel="tooltip" data-toggle="tooltip" data-placement="top" title="Last Year to Date">
<p class="value">
<?php the_sub_field( 'value' ); ?><i class="fa fa-info-circle"></i>
</p>
<p class="indicator <?php the_sub_field('indicator'); ?>">
<i class="fa fa-arrow-<?php the_sub_field('indicator'); ?>"></i><?php the_sub_field( 'percent' ); ?>% <label><span>Lytd</span></label>
</p>
</div>
<a class="read-more" href="<?php the_permalink(); ?>">More Stats</a>
<?php $first_article_stat = false; ?>
<?php endwhile; ?>
<?php $first_mm_stats = false; ?>
<?php endwhile; ?>
</div>
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!
2022 was a big year for Advanced Custom Fields, with more capabilities, a new generation of ACF Blocks, a refreshed UI, and a new home. Our year in review post looks at advancements we’ve made and offers a glimpse of the future.
— Advanced Custom Fields (@wp_acf) January 6, 2023
https://t.co/HahJUCcyH4
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.