I see several classes on the post you linked to:
- .category-discounts
- .category-anothercat
- .category-jackiscool
- .category-sponsored
- .category-student-life
As you wrote, everything is working fine there. Can you link to a post where things aren’t working as expected?
The class isn’t changed, I expressed myself wrong, is overruled. As you can see here: /what-is-lorem-ipsum/ the color of the category is the jackiscool category, that light blue. It changes the color for discount and anothercat. I can’t add important to every each class because nothing changes. I need each class to display the background color I assigned.
On this post everything is working fine /get-50-off-the-latest-voxi-sim-by-vodafone
The “Lorem Ipsum” post has the same categories as the “Where Can I Get Some?” post (which I listed before — apologies if I misread your message) and the “Vodafone” post — all three match.
It sounds like you’re applying unique CSS to each category, but when you apply multiple categories to each post, those CSS rules conflict, and you don’t get the one you want. Is that correct?
If so, then you may want to find another way to target your CSS, or use fewer categories — or add another, unique category that is just for CSS.
That is the thing, each post has one different category. Each color is one category for each post.
-
This reply was modified 6 years, 6 months ago by
Florian.
-
This reply was modified 6 years, 6 months ago by
Florian.
I checked these three category archives:
/category/sponsored/
/category/jackiscool/
/category/student-life/
The “Voda Phone” and “Lorem Ipsum” posts show up on each one. That shouldn’t be the case if each post had only one category. 🤔
That is the same section as in the post page at the end. Didn’t add yet the display of that category because it has only one post and I don’t know yet how the client wants to look like.
It is supposed to look like this:
/category/memes/
-
This reply was modified 6 years, 6 months ago by
Florian.
-
This reply was modified 6 years, 6 months ago by
Florian.
-
This reply was modified 6 years, 6 months ago by
Florian.
In case you missed it… Section:
How it should display
https://everythingstudent.co.uk/category/discounts/
How it displays on other category
https://everythingstudent.co.uk/category/sponsored/
I can’t figure out why it isn’t respecting the css everywhere.
-
This reply was modified 6 years, 6 months ago by
Florian.