Support

Account

Home Forums General Issues Displaying labels….isn't working…

Solved

Displaying labels….isn't working…

  • Hello,

    I have been trying to get labels to be displayed for a select option, but they do not display.

    $field = get_field_object('field_name');
    $value = get_field('field_name');
    $label = $field['choices'][ $value ];
    echo $label;

    I do have the field name correctly in my code…it simply isn’t displaying the label in the echo.

    Any ideas?

    **EDIT – It is working…was just an issue with my host that for some reason kept displaying a cached version of my page. Sorry about that…

Viewing 1 post (of 1 total)

The topic ‘Displaying labels….isn't working…’ is closed to new replies.