Site logo

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

Home Forums Support [Resolved] How to change the background colour of category link on Scribe template

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

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2472676
    nomadiceman

    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

    #2473246
    Fernando
    Customer Support

    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.

    #2473252
    nomadiceman

    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 🙏

    #2473258
    Fernando
    Customer Support

    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

    #2473265
    nomadiceman

    I understand thank you 🙏

    #2473285
    Fernando
    Customer Support

    You’re welcome!

    #2478493
    nomadiceman

    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

    #2478740
    David
    Staff
    Customer Support

    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.

    #2479267
    nomadiceman

    Oh yeah, seems obvious now.

    Thank you very much for your help

    Happy New Year 🥳

    #2479551
    David
    Staff
    Customer Support

    Happy New Year!
    Glad to be of help

    #2481290
    nomadiceman

    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

    #2481328
    Fernando
    Customer Support

    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.

    #2481334
    nomadiceman

    thank you, worked perfect 🙏

    #2481335
    Fernando
    Customer Support

    You’re welcome! 🙏

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.