Sure. I purchased the add-on for “repeater” fields, to make it easier to add several lines of information.
The initial code above just calls in the field ‘stockists’ (the name of the ACF I created). What I needed to do was call in the ‘repeater_field’ followed by each repeated field. Here’s the correct code..
<?php while(the_repeater_field('stockists')): ?> <div class="stockists"><br /> <strong><?php the_sub_field('stockists_name'); ?></strong><br /> <?php the_sub_field('address'); ?><br /> <?php the_sub_field('address_2'); ?><br /> <?php the_sub_field('city'); ?><br /> <strong><?php the_sub_field('phone_number'); ?></strong><br /> <?php the_sub_field('website'); ?><br />
So ‘stockists’ was the original custom field. Name, address, city etc are the repeater fields.
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!