We use the Types plugin to setup different custom products for a client. A certain custom post (product) contains some custom fields which is a drop-down select. When creating a new product of this type, the user may select one option from that list.
For example, let say that certain product has a custom field of type select with the following options set :
1 = Option A 2 = Option B 3 = Option C
Now, in a template, I'm trying to display the label for that custom field. The best thing I came up with is by doing :
$value = reset(get_post_custom_values('custom_field', $post->ID));
which would return a string, for example
"1", the value of the custom field. Now, this is worthless as I need to display the label (the chosen item from the list, for example
"Option A") in that template.
How do I find the associated label for that custom field value?