Home › Forums › Front-end Issues › CSS Styling based on value of field › Reply To: CSS Styling based on value of field
Hi! I’m looking for the exact same thing, has any of you guys figured out how to do it?
Currently I have a selector field with values in it, like @deejr on the first post. I want either to change the background of the selected value on the front-end or change the value color (in the front-end also), based on the user’s choice. Fields have numbers as possible choices, so if a user chooses “99”, the color should be blue, if he chooses 82, green, etc.
Also I need this to work with a field in particular. Any idea of how to implement this using HTML, CSS or php? I’m currently using this theme btw: https://es.wordpress.org/themes/rookie/
I’ve read @giovannicold ‘s answer but I can’t get it to work, where should I place the code exactly?
Thanks in advance.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.