Support

Account

Home Forums General Issues wrap choice value into link Reply To: wrap choice value into link

  • Just amend the HTML to include the $label in the a tag:

    <?php
    $field = get_field_object('field_name');
    if( $field['choices'] ): ?>
        <ul>
            <?php foreach( $field['choices'] as $value => $label ): ?>
                <li><a href="<?php echo $label; ?>"><?php echo $label; ?></a></li>
            <?php endforeach; ?>
        </ul>
    <?php endif; ?>