[Plugin: Simple Fields] Problems with drop-down menu values
-
I’m having a problem returning the value for drop-down menu values. I have a simple fields drop down in a page template within the WP dashboard, so I can choose a colour for an item via a dropdown on the page edit screen. If I use this:
simple_fields_get_post_value(get_the_id(), array(4, 1), true);?>
then the value returned is ‘green’ – the value I have chosen in the simple field dropdown within the WP dashboard.
However, I want to do this using the ‘slug’ instead of the ‘meta-key’:
<?php $breadcrumbcolor = simple_fields_value('breadcrumb_colour');?>
but the value returned is ‘dropdown_num_2’.
I can see how I can use ‘dropdown_num_2’ as a class in the css but it’s going to be much more labour intensive AND if I change anything in the simple fields setup – the order of the values etc, it will mess up the css as the ‘dropdown_num’ changes.
Is there anyway to return the actual value using the slug method?
- The topic ‘[Plugin: Simple Fields] Problems with drop-down menu values’ is closed to new replies.