Home › Forums › Front-end Issues › different css for select entrys › Reply To: different css for select entrys
Hi @seraph1976,
Thanks for the post.
To achieve this, you would need to create a conditional block to check for the value selected and then call a certain class within that selection.
For a single-value select field, the code would look like so:
if(get_field('select_field_name') == "value_1")
{
//call the class here
}elseif(get_field('select_field_name') =="value_2")
{
//some other class here
}
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.