[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 15 posts - 1 through 15 (of 17 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

    #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

    glad to be of help

    #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

    You’re welcome

    #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.

    #1989568
    Paul

    Hello David,
    thankyou for the above code that helped my to solve one problem!
    However, now the headlines of posts that I am showing via the WP Show Posts plugin inside a posting (e.g. referrals to other posts) are also in the same colour. These should remain in the colour which I have assigned to them in Customiser/Colors/Content.
    Help would be very much appreciated!
    Thanks, Paul

    #1990008
    David
    Staff
    Customer Support

    Hi Paul,

    can you raise a new topic where you can use the Private Information field to share a link to the page where i can see the change you require

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