Change each tag colour

Posted in: Newspaper
Post count: 30

Hi,
How can I change the colour of each category tag please?
For example, Accommodation will be yellow, Music will blue.

Post count: 35449

Hi,

In order to have different category tag color on post page you can check the options from Theme Panel> Categories in Per category settings section -> http://prntscr.com/oh7eu0 -> https://forum.tagdiv.com/default-category-settings/
If you want to achieve this on blocks/modules, you can do this only using custom css -> https://tagdiv.com/how-to-create-custom-code-in-newspaper-theme/
You can check this similar topic -> https://forum.tagdiv.com/topic/how-can-i-show-the-category-of-each-post-on-the-thumbnail-of-the-post/

Hope this will help you!
Thank you!

Post count: 30

Hi, Thanks I have checked the link and this is what I also want to do. However it does not work for me.

.td-module-image a[href$="/news/"],
.td-meta-info-container a[href$="/news/"]
{
background-color: green;
}
.td-module-image a[href$="/nxt/"],
.td-meta-info-container a[href$="/nxt/"]
{
background-color: blue;
}
.td-module-image a[href$="/wweresults/"],
.td-meta-info-container a[href$="/wweresults/"]
{
background-color: red;
}

If my block does not contain any images, do I still use the “td-module-image part”?
For example, I am using block 9 which is only title and text. The code above is not changing the category tag colour within the block element.
My category is titled “Employment”, what different code do I need to use to change colour please?

Thanks.

  • This reply was modified 7 years by brael.
Post count: 35449

Hi,

If you are not using featured images, then the code need to be adapt, please provide me a link to your website and some details about the the blocks that you want to change the category background color and I will adapt the code for your needs.

Thank you!

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