CSS styles depending on column entries?
Hi!
There is a custom record type, and depending on the chosen heading you select a background color for the record. How to do it humanly?
For example, choose a category No. 1 for one record - the background was red, choose a category # 2 for another record - the background was blue, etc.
2 answers
Option light
body_class zhezh
.tax-my_custom_tax.term-my_custom_term_1{background-color:red}
.tax-my_custom_tax.term-my_custom_term_2{background-color:green}
Option does not light
term meta in the term of custom taxonomy to it cling to ColorPicker, in record get the value of this field
As an option in database in table "categories" you will have a field color which you pass to the front which is the thing draws. In the admin area or wherever you are creating the site, there do some colorpicker with the choice of colours for headings.
Find more questions by tags WordPress
Yes, it is necessary to add a filter class in a single term, something like this
- Earlene_Stehr34 commented on June 10th 19 at 15:18