[Resolved] Category – Colored Meta on Blog Archive

Home Forums Support [Resolved] Category – Colored Meta on Blog Archive

Home Forums Support Category – Colored Meta on Blog Archive

  • This topic has 5 replies, 2 voices, and was last updated 4 years ago by David.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #832646
    Patrick

    Hi, wasn’t able to find a solution anywhere.

    I want to change the color depending on the category name meta on the Blog Archive page. So make “News” orange for example and Guides blue, etc. (http://prntscr.com/mv1fbi)
    When I check the inspector there is no class or id for each category.

    Thanks in advance

    GeneratePress 2.2.2
    GP Premium 1.7.8
    #832679
    David
    Staff
    Customer Support

    Hi there,

    how many categories do you have on each Post? Is it more than one ?

    #832703
    Patrick

    Well I will have around 4 Categories, and it would be nice if on the blog archive page each category would have a different color.
    Here is an Example Website that does that: https://www.gamezebo.com/

    They have “News” in orange and “Walkthroughs” is an other color.

    #832734
    David
    Staff
    Customer Support

    The post article iteslf carries the category class so this would style the cat link on the archives for that particular category-slug:

    :not(.single-post) .category-slug .cat-links a {
        background-color: red;
        padding: 4px;
        color: #fff;
    }
    #832740
    Patrick

    Ahh thanks thats exactly what I wanted

    #832767
    David
    Staff
    Customer Support

    Awesome – glad to be of help

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