Hello guys,
hope some of you has did that already.
I want to use the names of selected checkboxes in the frontend as bullets from ACF.
Do someone has an idea how to create that way in the php templates?
Please see an example from the backend and want to use.
Thanks and best regards
I write it for the values like this at the moment <?php the_field(‘myfieldname’);?>
Looking at the docs
You simply need to loop through your checkbox field:
<?php
$colors = get_field('colors');
if( $colors ): ?>
<ul>
<?php foreach( $colors as $color ): ?>
<li><?php echo $color; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
Just change colors to your field name
That’s perfekt. Thank you very much.
It fixes exectly what I has need for.
I definitely has to learn that backend stuff.
Merry christmas man!