Get custom select field OPTIONS translated into a template
-
Hi,
I need to get the select values of a custom select field to be displayed in a template, the idea is to populate a menu with this option.
e.g.
select field name: food-category
options: Savoury, Sweet, Bread …So far I managed to get the values this way:
$option_values_select=get_option(‘wpcf-fields’);
$actual_option_value=$option_values_select[‘food-category’][‘data’][‘options’];
then a loop:
foreach($actual_option_value as $key=>$val) {echo $val.’
‘}NOW I need this values translated into german, I have WPML and have them translated already as strings, but can’t find the way to pull them into the template.
Please can you assist?
- The topic ‘Get custom select field OPTIONS translated into a template’ is closed to new replies.