Is there a guide on converting old location rules to the current set?
nevermind, fixed it with an if (is_admin())
Ok, this is what I mean.
<div class="tabz">
<?php if( have_rows('employees') ): ?>
<ul class="employees">
<?php $count = 1; ?>
<?php while ( have_rows('employees') ) : the_row(); ?>
<li><a href="#employee-<?php echo $count; ?>" style="background-image: url(<?php the_sub_field('photo'); ?>);"><div class="hover"><?php the_sub_field('title'); ?></div></a><strong><?php the_sub_field('name'); ?></strong></li>
<?php $count++; endwhile; ?>
</ul>
<?php endif; ?>
<?php if( have_rows('employees') ): ?>
<?php $count = 1; ?>
<?php while ( have_rows('employees') ) : the_row(); ?>
<div id="employee-<?php echo $count; ?>" class="employee-bio">
<div class="row">
<figure style="background-image: url(<?php the_sub_field('photo'); ?>);"></figure>
<article>
<h2><?php the_sub_field('name'); ?></h2>
<h3><?php the_sub_field('title'); ?></h3>
<?php the_sub_field('biography'); ?>
</article>
</div>
</div>
<?php $count++; endwhile; ?>
<?php endif; ?>
</div>
I want to run both for every 5 rows
Not quite what I meant.
What I need to be able to do is get the first five rows of a repeater, repeat the first five rows of that repeater in a different format, then do the next five rows and repeat the next five rows in a differetn format.
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.