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
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
Hi there,
Any chance you can link us to the page in question?
You can use the private information field:
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
Are you referring to this?
https://www.screencast.com/t/DYbIOmsP0pV
If so the color is currently set in the inline style.
If you remove the inline style, then this CSS should be what you are looking for:
.entry-content a {
color: #000;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
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
This one should work in the same way: https://share.getcloudapp.com/mXub6Lb9
Any custom CSS code added through Additional CSS won't appear in the Backend by default.
Yea I tried that setting before but it turned all links on page blue