I use WordPress Custom Fields to provide customers with various product color codes in a drop-down list, but now I would like to add the various color thumbnails for ease of selection…similar to how color is selected in this site: http://www.blackhairspray.com/outre-quick-weave-belinda-outreqsbel.html
Can anyone give me an idea of how to do this in wordpress please or point me to a relevant tut?
since googling has failed to provide the goods so i am eagerly holding my breathe for a SuperUser delivery 🙂
Store each custom field as a comma separated pair. Like this:
option_name, option_image_URL
Then we do this (within the loop)…
Then loop through the options array:
Each of the images should have an id attributes should have an ID attribute that’s the same as one of the drop down options. You can then use some javascript to change the options around.
This javascript probably won’t work, but it will get you started: