Site logo

Archived topic

How to change the background colour of category link on Scribe template

13 replies · Started by nomadiceman on December 24, 2022

Viewing posts 1–14 of 14

Is there a way to have different colour backgrounds for the different category links that are above each image for the post.

You can see on the home page of the Scribe template https://gpsites.co/scribe/

You can see the category links background above each post is a purple, how can I make each category have a different background colour?

Previously I managed to do this using this CSS:

.cat-links a[href*="/mycategory"] {
    background-color: #43AA8B;
}

Thanks guys for your help

Hi Nomadice,

Can you try adding this through Appearance > Customize > Additional CSS?:

.home article .gb-button-wrapper .gb-button.term-business {
    background-color: #ff0000;
}

Replace business with the term slug, and the color value with your preferred color.

Thank you. Can you explain what you mean by:

“Replace business with the term slug, and the color value with your preferred color.”

Not sure I understand correctly 🙏

In the code above, replace business with whatever the category term slug is. Example: https://share.getcloudapp.com/7Kujox7b

Replace #ff0000 with the color value you wish to use. Example: #43AA8B

I understand thank you 🙏

You're welcome!

Hi, this works great on teh home page, but not on the author archives.

What code do I need to use to make this work on the author archive pages?

Thank you so much

Hi there,

remove the .home class from the selector eg.

article .gb-button-wrapper .gb-button.term-business {
    background-color: #ff0000;
}

Then that will apply wherever there is a linked term being displayed by a GB Button.

Oh yeah, seems obvious now.

Thank you very much for your help

Happy New Year 🥳

Happy New Year!
Glad to be of help

Hi guys.

It seems now that it stops working when you’ve previously visited that category. The button stays as blue. See attached link to my site

How can I stop that?

Thank you so much

I see. Can you try this syntax to stop that?:

article .gb-button-wrapper .gb-button.term-insights:is(:visited, :link) {
    background-color: #ff0000;
}

Replace term-insights with your preferred term.

thank you, worked perfect 🙏

You're welcome! 🙏

This archived topic is closed to new replies.