Support

Account

Home Forums Add-ons Gallery Field Display all the unique value of a field Reply To: Display all the unique value of a field

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