Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Resolved] Change links color in post/page

Home Forums Support [Resolved] Change links color in post/page

Home Forums Support Change links color in post/page

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #808993
    Velin

    Hi there,

    I have a quick question about the links in my posts and pages. I know I am able to change the link color from Customize -> Colors -> Content. However, this also changes the links color on my home page (as I have set it to show my latest posts). I need to be able to define a custom color only for the text links which I’m including in my posts and pages, without messing with the rest of the links.

    Is there any way to achieve that?

    Thanks,
    Velin

    GeneratePress 2.2.2
    GP Premium 1.7.7
    #809069
    David
    Staff
    Customer Support

    Hi there,

    you can target them specifically with this CSS – just change the colors accordingly:

    .single-post .entry-content p a, .single-post .entry-content li a {
        color: red;
    }
    .single-post .entry-content p a:hover, .single-post .entry-content li a:hover {
        color: green;
    }
    #809093
    Velin

    Hi David,

    Thanks, works like charm πŸ™‚

    #809101
    David
    Staff
    Customer Support
    #809187
    Velin

    Hi, sorry to reopen this, but I’ve noticed something. After I applied the custom CSS, the links in my social icons are also in the same color as my main links.

    Mind if you take a look and let me know how to fix that? I believe you have a link to the website, click on the latest post and scroll down to the bottom of the page to see it.

    Thanks,

    Velin

    #809195
    David
    Staff
    Customer Support

    I edited the code above so it will only effect the links within a paragraph.

    #809203
    Velin

    Thanks πŸ™‚

    #809206
    David
    Staff
    Customer Support
    #817463
    Velin

    Hi David,

    Sorry for reopening this thread. Any chance to update the code to affect links in list items too?

    Thanks,
    Velin

    #817472
    David
    Staff
    Customer Support

    No problems. edited the code above to include lists πŸ™‚

    #817492
    Velin

    As always thank you for the quick reaction πŸ™‚

    #1568992
    Netranand

    Hi,
    When I in admin mode, I can see the link color in blue but when seeing the publish view or the actual published view the link colors are in black color only. Please help

    #1569146
    David
    Staff
    Customer Support

    Hi there,

    can you raise a new topic where you can share a link to your site so we can see what the issue is.

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