Home › Forums › Add-ons › Repeater Field › Output repeater field with radio button sub fields › Reply To: Output repeater field with radio button sub fields
Hi Jonathon, Thank you for your assistance.
To clarify:
Part 1
I have put the functions part of the code (from here: sort a repeater field) in my functions.php file. I have replaced the field key with my relevant custom field key.
The part of this function that I don’t understand is this part:
add_filter('acf/load_value/name=scores', 'my_acf_load_value', 10, 3);
What do I need to change here, and to what?
And, do I repeat this function when I have more than one custom field to sort?
Part 2
Then I have put the php code within my single_custom_post_type.php file and replaced ‘repeater’ with my same field key as used in the function.
<?php if( have_rows('field_5650dfe9c5250') ): ?>
<ul>
<?php while( have_rows('field_5650dfe9c5250') ): the_row(); ?>
<li><?php the_sub_field('id'); ?>. <?php the_sub_field('name'); ?></li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
I am not getting any result?
Where am I going wrong?
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.