Custom field to return images based on values
-
I’ve been trying to understand custom fields for a long time, but despite all the guides and pages I’ve looked at, it’s just not clicking for me.
I want to have a custom field return a sort of rating based on the value I set. The first value will display on the page as, “Does it work?” and I’d like it to return either a thumbs-up or a thumbs-down. Ideally, I’d have a custom field with the key of “works” and type in either up or down and it would return the proper image.
In another instance, I want to display, “How easy was it?” and have it return an image of five stars–I’d have different images to display how easy it was, so 2 stars, 2.5 stars, 4.5 stars, etc. Ideally, the field key would be something like “easy” and I’d type in a numeric value like “4.5,” and then the proper image would be displayed.
These two instances are pretty similar, but I can’t find any examples of doing this and the examples I’ve found aren’t leading to any understanding on my part (not sure how many pages I’ve found where they’ve copied the “mood and music” example from the codex). Can anyone point me in the right direction on this?
- The topic ‘Custom field to return images based on values’ is closed to new replies.