Home › Forums › General Issues › Nested repeater within flexible content › Reply To: Nested repeater within flexible content
Thanks Elliot, however, I still cant get the price repeater to display. This is what I changed it to:
<?php while(has_sub_field("menu_category")): ?>
<?php if(get_row_layout() == 'menu_category'): ?>
<div class="article-wrap clearfix">
<?php if (get_sub_field('category_name')){?><h2><?php the_sub_field('category_name');?></h2><?php } ?>
<?php if (get_sub_field('category_description')){?><p><?php the_sub_field('category_description');?></p><?php } ?>
<div class="colpad">
<ul>
<?php if(get_sub_field("menu_items")): ?>
<?php while(has_sub_field("menu_items")): ?>
<li class="dontsplit">
<h3><?php echo get_sub_field("item_name"); ?>
<span>
<?php if(get_sub_field("price")): ?>
<?php foreach(get_sub_field("price") as $p): ?>
<?php echo $p['price_option']; ?>
<?php endforeach; ?>
<?php endif; ?>
</span>
</h3>
<p><?php echo get_sub_field("item_description"); ?></p>
<?php endwhile; ?>
</li>
<?php endif; ?>
</ul>
</div>
</div><!-- /article-wrap -->
<?php endif; ?>
<?php endwhile; ?>
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.