Different text colors depending on the categories of posts

Posted in: Newspaper
Post count: 25

Hello,

I need to use different text colors according to categories (in my posts and in my archive pages): color titles (h1, h2 …), quotes, certain styles, etc.
Example: red for one of the categories as in this page https://www.caleis.fr/clients/grandirautrement/webdesign/img/wd/WD51article_GA.jpg

How to achieve this?

Thanks
cordially

Guillaume Bouquet

Post count: 20688

Hi,

You can set colors for various elements as creating the post
– https://www.screencast.com/t/93yraB6qF
But for all posts at once you could try that with CSS, that would be the only way of achieving something like that. For example a code like this will set a color for the paragraphs and all headings in the post content belonging to a specific category
– https://www.screencast.com/t/nDjjeNRa
The browser inspector can help you identify the elements needed and create custom code
– https://forum.tagdiv.com/create-custom-code-using-the-browsers-inspector/

Thanks

Post count: 25

Hello,

Thank you for your reply.

To be a little more precise, is it possible to retrieve the color code defined in the “theme panel” (> layout settings> categories)?

cordially

Post count: 20688

Hi,

That color set for the category tags is retrieved in this file, then used to color the category tags only, that is all it does at the moment
– https://www.screencast.com/t/POaPfFfa
It will probably require many theme modifications to use that color for anything else, if even possible.

Thanks

Post count: 25

ok, thanks Simion.

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.