Click here to Skip to main content
15,665,166 members
Please Sign up or sign in to vote.
1.24/5 (3 votes)
See more:
I have multiple product categories and I want each category title to have a different colour. Since I am unable to get the page id I am unable to do so.

I tried using the category id as well but it did not work.

Please suggest me a method to get the page id for each category.

What I have tried:

.catid-70 .page-title { 
	text-transform: lowercase;
	color: #49488d;}
Updated 25-Oct-21 21:10pm

1 solution

The class that get's added to the <body> for a category with an id of 70 is term-70.

So your CSS would need to be:

.term-70 .page-title { 
	text-transform: lowercase;
	color: #49488d;}
Share this answer
Primo Chalice 26-Oct-21 3:21am    
Thank you so much. I had been stuck on this for days.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900