Currently I am using this php code to display Text from a Custom Field with Name ‘years’ in a theme in wordpress, that works well
php echo get_post_meta($post->ID, ‘years’, true); (Including the php opening and closing tags)
Now the problem I have is that if I want to change this Custom Field from Text, to a Drop Down Box (a select2 type), with different values to choose from like (2013,2014,2015), I cannot find how to display this values with this php code correctly.
I am guessing I need to add more code or to change this one so its able to display this values as now it only shows the number that corresponds to the position of the array,
and I cant make it yet.
Do you know how I can show this example I am explaining so that my result page shows the numbers of the years for this kind of custom field? Currently with this code I just get as result position number values or the word Array. Thanks