You can do this with the Custom Content Shortcode Plugin.
https://wordpress.org/plugins/custom-content-shortcode/
It works great with ACF.
For this it would look like:
[repeater acf_group_field_name]
[field acf_sub_field_name]
[/repeater]
I agree. This would be a nice feature.
@elliot Any update on this? This would be a HUGE time saver.
Perfect! Thanks @James
Thanks. Yeah I think a simple checkbox for a text field saying “use as layout title” would be great. Right now it’s almost useless to sort items when you have 8 or more flexible fields.
That temp fix isn’t working for me. Elliot, how can we fix this??
Nevermind Elliot, stupid mistake on my part. Your solution did work.
Thank you very much!!
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; ?>
I have the same issue when trying to use the upload field on the front end. I have a fresh install of wp and acf is the only plugin running.
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.