Skip to content

Instantly share code, notes, and snippets.

@aaronranard
Created November 10, 2015 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronranard/4777bdc44e4c0ac6e629 to your computer and use it in GitHub Desktop.
Save aaronranard/4777bdc44e4c0ac6e629 to your computer and use it in GitHub Desktop.
PHP: WordPress ACF output select field
/*
* Displaying a single value's Label
*/
$field = get_field_object('field_name');
$value = get_field('field_name');
$label = $field['choices'][ $value ];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment