Hello, How do I get the value and the label from a list ?
http://xxxxx.co.uk/dev/ : Red
http://xxxxx.co.uk/dev/2 : Blue
I’m trying to show them as links to the value defined URL
Hi @vektormedia
You can load the field object and find the value and label like so:
<?php
/*
* Displaying a single value's Label
*/
$field = get_field_object('color');
$value = get_field('color');
$label = $field['choices'][ $value ];
?>
Read more:
http://wordpress.stackexchange.com/questions/90394/get-the-label-from-acf-checkbox
Hope that helps.
Thanks
E