About image_selet field
Hi! I am a bit confused about image_select field. I was trying to create an option for select a layout on my theme using images. I was thinking that this options was like a simple radio option with images as label, but the output of the option is the image url. If there a way to output the option key and not the value?
This is my field:
array(
'id' => 'layout',
'type' => 'image_select',
'title' => __('Layout', 'nmd'),
'subtitle' => __('Blog archives page layout.', 'nmd'),
'options' => array(
'left' => array('title' => 'Left', 'img' => ReduxFramework::$_url . '../sample/patterns/2cl.png'),
'right' => array('title' => 'Right', 'img' => ReduxFramework::$_url . '../sample/patterns/2cr.png'),
'full' => array('title' => 'Full', 'img' => ReduxFramework::$_url . '../sample/patterns/1col.png'),
),
'default' => 'right'
),
I want this to output "left", "right" and "full", can I achieve this with redux?
Thanks
I think you just have your syntax wrong. Here's the documentation for the field.
http://docs.reduxframework.com/core/fields/image-select/
It's all there. :)
Yes, sorry i was confused with select_img field..
select_image is for selecting a field. image_select is for selecting a value using images. :)