Home › Forums › Add-ons › Repeater Field › Repeater field doesn't work with Flexslider › Reply To: Repeater field doesn't work with Flexslider
Hi James. I apologize for asking too much questions. I’m still not very familiar with PHP and just took a course about ACF.
I have tried to do this with Custom Post Type UI and this time it’s for the team section: http://tympanus.net/Freebies/HalcyonDaysTemplate/#
I did the same thing just like the last code you posted but there’s an extra slide with empty content. What am I missing?
<div id="teamSlider">
<ul class="slides">
<?php $team = new WP_Query( array(
'post_type' => 'team',
'orderby' => 'post_id',
'order' => 'ASC'
)); ?>
<?php
$li = 0;
$max_li = count($team);
?>
<li>
<?php while($team->have_posts()) : $team->the_post(); $li++; ?>
<div class="col-md-4 wp5">
<?php if(has_post_thumbnail()) {
the_post_thumbnail();
} ?>
<h2><?php the_title(); ?></h2>
<p><?php the_content(); ?></p>
<div class="social">
<ul class="social-buttons">
<?php if(get_field('social_account')) : while(has_sub_field('social_account')) : ?>
<li>
<a href="<?php the_sub_field('team_social_link'); ?>" class="social-btn">
<?php the_sub_field('team_social_icon'); ?>
</a>
</li>
<?php endwhile; endif; ?>
</ul>
</div> <!-- END .social -->
</div> <!-- END .col-md-4 .wp5 -->
<?php if($li % 3 == 0 && $li != $max_li) { ?>
</li><li>
<?php } ?>
<?php endwhile; ?>
</li>
</ul> <!-- END .slides -->
</div> <!-- END #teamSlider -->
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βre excited to announce we've released Composer support for installing ACF PRO.
— Advanced Custom Fields (@wp_acf) January 31, 2023
π #ComposerPHP fans rejoice!
β¨ Please see the release post for all the details and full instructions. https://t.co/ebEfp61nlR
© 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.