Created
November 10, 2015 22:00
-
-
Save aaronranard/4777bdc44e4c0ac6e629 to your computer and use it in GitHub Desktop.
PHP: WordPress ACF output select field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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