CSS for element in particular category on the main page
-
I’m trying to target an element within an entry on the main page such that, for example, the h2 title of all category-blue entries is blue and the rest, i.e. those in other categories, are “normal.” I’ve inserted
<?php post_class() ?>
into the target element, and I’ve got a line in the CSS to control the class category-blue (e.g.)—but I’m getting no joy. The source code shows that my element contains the class category-blue, which makes the result puzzling. (If I hard code a class into the element, as a test, I have no trouble controlling the formatting with CSS.)Does the
<?php post_class() ?>
template somehow not work on the main page? on an element within an entry?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘CSS for element in particular category on the main page’ is closed to new replies.