Home › Forums › Add-ons › Repeater Field › A repeater in random order including select fields › Reply To: A repeater in random order including select fields
Okay so this almost worked… it outputted the following
http://domain.com/template-directory <ul> <li>Caption 1</li> <li>[img src="logo_Grey.png" ]</li> <li>Caption 2</li> <li>[img src="logo_Grey.png" ]</li> <li>Caption 3</li> <li>[img src="logo_White.png" ]</li> </ul>
No random order unfortunately, no real progression from my original (revised) code.
<?php if(get_field('slider_image')): ?> <?php while(has_sub_field('slider_image')): ?> <?php the_sub_field('the_caption'); ?> <img src="<?php bloginfo('template_directory'); ?>/logo_<?php the_sub_field('logo_colour'); ?>.png" /> <?php endwhile; ?> <?php endif; ?>
Once again thank you for persevering!
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've just released ACF 5.12.3 with a security fix to prevent arbitrary file uploads to forms with ACF fields.— Advanced Custom Fields (@wp_acf) July 14, 2022
Now that we've released this update, we recommend updating your sites as soon as possible.
© 2022 Advanced Custom Fields.