Support

Account

Home Forums General Issues ACF checkbox choices links Reply To: ACF checkbox choices links

  • Hi @studiotopo

    I believe all you need is to wrap the selected value within anchor tags as below.

    <?php $colors = get_field('smp2'); ?>
    <?php if( $colors ): ?>
    <?php foreach( $colors as $color ): ?>
    <a href="<?php echo  link-to-the-color ?>"><span class="scolor-<?php echo $color; ?>"></span></a>
    <?php endforeach;
    endif; ?>

    Hope this helps.