Support

Account

Home Forums Front-end Issues Get option labels without post/user ID Reply To: Get option labels without post/user ID

  • get_field_object requires the field key if you are not referencing a saved value. The field key looks something like: field_53beaa2f69615

    In the Edit Field Group screen:
    Screen Options (window shade) > Show Field Key: Yes

    One you have it:

    $field = get_field_object($field_key);
    echo $field['choices']['fr'];

    foreach( $field['choices'] as $name => $label ) { ... }

    For more: http://www.advancedcustomfields.com/resources/get_field_object/