[Support request] Different color of Title link depending on category

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Different color of Title link depending on category

Tagged: , ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32281
    thaice20
    Participant

    I want the post title link hover colour to be different depending on what category that post is in.

    I achieve this in GeneratePress at the moment with this code

    .generate-columns-container .category-dogs h2.entry-title a:hover {
        color: #00bca2;
    }
    .generate-columns-container .category-cats h2.entry-title a:hover {
        color: #794fff;
    }
    .generate-columns-container .category-birds h2.entry-title a:hover {
        color: #4a66f7;
    }

    This works great on my category archives.

    However I use WPSP Pro on the front page and now I need the code for the WPSP to do the same

    Please advise how I can do this

    Thank you

    #32283
    thaice20
    Participant

    I think I’ve figured it out. Does this look correct?

    .wp-show-posts .category-dogs h2.wp-show-posts-entry-title a:hover {
        color: #00bca2;
    }
    .wp-show-posts .category-cats h2.wp-show-posts-entry-title a:hover {
        color: #794fff;
    }
    .wp-show-posts .category-birds h2.wp-show-posts-entry-title a:hover {
        color: #4a66f7;
    }
    #32285
    elvin
    Moderator

    Hi there,

    Yes that would work. category-slug is added on the parent element (<article>) so you can use that as a selector if you want category-specific styling. 😀

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