in_category adding a class in the ECHO
-
I am working on this website, and I need to place some conditional codes. Basically, if some one is at the category called good_news, it should display in the <div class=”category”> This is what I am doing now
else if (in_category('good_news')) {echo ("background:#a5dce0 !important;");}
This is the out-put:
<div class=”category” style=”background:#a5dce0 !important;”>
How would I go to add an extra class inside the div?
Also, I want to make the font color change: #000
Thanks,
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘in_category adding a class in the ECHO’ is closed to new replies.