I created an ACF checkbox field for CTE class offerings for our campuses. And I want to create a dynamic list element that displays the selected checkbox fields on the individual campus webpages.
It will be impossible to adequately display without creating PHP code.
Without code, you can only display values separated by commas.
Darn, that’s what I was hoping to avoid is PHP code.
In case I misunderstood, the sample code from ACF is quite easy:
<?php
$colors = get_field('colors');
if( $colors ): ?>
<ul>
<?php foreach( $colors as $color ): ?>
<li><?php echo $color; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
Cheers
Patric
Yes this is what I was looking for.
Thanks
1 Like