Category name as a class on category anchor

Posted in: Newspaper
Post count: 4

Hi, i need to add category name as a class in anchor link in order to give different backgrounds colors to each category.

Anywone known where are the template to edit this?

Thanks.

Post count: 35449

Hi,

Unfortunately for this moment this can be achieve only with custom css -> https://i.imgur.com/KeEMCVQ.jpg

.td-module-image a[href$="/music/"],
.td-meta-info-container a[href$="/music/"],
.td-module-container a[href$="/music/"],
.single .td-category a[href$="/music/"],
.tdb_single_categories a[href$="/music/"]
{
background-color: green;
}
.td-module-image a[href$="/architecture/"],
.td-meta-info-container a[href$="/architecture/"],
.td-module-container a[href$="/architecture/"],
.single .td-category a[href$="/architecture/"],
.tdb_single_categories a[href$="/architecture/"]
{
background-color: red;
}

All you need to do is to change the category in code and the background color will apply on that category.
Set the custom css in Newspaper>Theme panel>Custom code>Custom css

Thank you!

Post count: 4

Oh thanks, this may can help.

Thanks you!

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