Site logo

Archived topic

How to change text link colors only for the article and not all links

15 replies · Started by Justin on December 14, 2022

Viewing posts 1–15 of 16

I want to change the color for my blocks that have text with links to blue but if I change it in customizer-content-link it changes the color on text with links on global things like go to page 2 buttons or go to previous blog titles

I just my text links to turn blue on posts and pages without making every text with a link on a post or page if that makes sense like for example, i don't want my navigation that links to a previous post to be in blue

Hi Justin,

It makes sense. However, can you point us to a specific Post or Page that has a link color changed by Leo's code that isn't supposed to be? We'll adjust the code afterward.

I reverted the change because it made all links blue so what way do you guys normally recommend through customization to do it properly?

That's odd. Leo's code shouldn't turn all links including the nav link blue. It only targets links in the content. If you're targeting specific links, doing it through custom CSS would be a good approach.

Can you point us to a sample link you want to alter?

I want to apply this to the whole website because right now if add a link to a text in my post you can't see its a link and I now it's hard to find what text has links attached

Try either of these instead:

.entry-content p a {
    color: #0000ff;
}

or

.entry-content a {
    color: #0000ff;
}

See which one works.

Any way I can do it without css?

The way would be through Appearance > Customize > Colors > Content > Link. But, if you're changing only paragraph links or something particular, doing it through custom CSS would be the correct approach.

.entry-content a {
color: #0000ff;
}

this one worked but not on the backend so when I'm creating a post or editing one. I wish there was just a setting in customizer that had that setting

Yea I tried that setting before but it turned all links on page blue

This archived topic is closed to new replies.