Home › Forums › Add-ons › Repeater Field › Repeater + Multiple Values › Reply To: Repeater + Multiple Values
Hi @dseiner
Please use the code tags to post code sampels in the future.. makes our lives easier 🙂 It seems your attachment is missing as well.
I would suggest that you have two different repeaters. One for paleo and one for low carb. That way it’ll be easy for you to separate them into different pages.
As for separating the rows in weeks you can just have a counter and begin a new section for each 7th row.
Something like:
<?php if( have_rows('repeater') ): ?>
<?php
$row_count = get_field('repeater');
$i = 0; ?>
<div class="week-section">
<?php while( have_rows('repeater') ): the_row(); ?>
<?php
$i++;
if( $i % 7 == 0 ): ?>
</div>
<div class="week-section">
<?php endif; ?>
Some content
<?php if( $row_count == $i ): ?>
</div>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
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.