Change link-color in posts ONLY

Posted in: Newsmag
Post count: 2

Hi,
We’ve just started using Newsmag, and it’s working great on so many things, but one thing we do struggle with, is how to change the link color in posts only? I found a CSS-code to change the link color for the entire site, but i don’t want the links on the front page to be of any different color.

Any help is appreciated.
Thanks!

EDIT: These are the codes i got working for the entire site btw:
/* unvisited link */
a:link {
color: #FF0000;
}

/* visited link */
a:visited {
color: #00FF00;
}

/* mouse over link */
a:hover {
color: #FF00FF;
}

/* selected link */
a:active {
color: #0000FF;
}

Post count: 6600

Hi,

As I’m not sure if you want this for the entire post page or just the post content I will post here the solution for both cases:
Use them like this to affect the whole page(including menu/sidebar..):

/* unvisited link */
.single a:link {
color: #FF0000;
}

/* visited link */
.single a:visited {
color: #00FF00;
}

/* mouse over link */
.single a:hover {
color: #FF00FF;
}

/* selected link */
.single a:active {
color: #0000FF;
}

Or like this to affect just the content of the post:

/* unvisited link */
.single .td-post-content a:link {
color: #FF0000;
}

/* visited link */
.single .td-post-content a:visited {
color: #00FF00;
}

/* mouse over link */
.single .td-post-content a:hover {
color: #FF00FF;
}

/* selected link */
.single .td-post-content a:active {
color: #0000FF;
}

Hope this helps!

Thanks

  • This reply was modified 11 years by Lucian.
Post count: 2

Awesome! Thank you so much! I forgot to mention it was only the content of the post i wanted, so great job reading my mind! haha 😉

Thanks again, this was very, VERY helpful!

Post count: 22

i have attempted to implement this solutions (for posts only) in:

https://ifahamutanzania.com/wp-content/plugins/td-standard-pack/Newspaper/assets/css/td_standard_pack_main.css

i cannot seem to see any changes to links i have made on multiple words, they are still the same color (i changed the html color code to blue – #0000FF)

What am i doing wrong? see screenshot here:

https://drive.google.com/file/d/1unR1HQWBDOHADjYvhDKdKkiDvb56zTpP/view?usp=sharing

Kindly assist with the proper place (path to the right file) to implement and any correction needed

Post count: 18283

Hello !

Please note that this solution is for Newsmag Theme not for Newspaper Theme. You are using Newspaper theme. For that you will have to go in Theme Panel – Theme colors and there you will be able to change theme colors.

Thank you !

Post count: 22

Already went in there prior sending this inquiry….the only option is “theme accent color”.

Problem with this option it changes colors of other places that i do not want for example the main menu link colors and some read more buttons in some blocks.

All i want is to change colors of links that i make manually in content post…and that is why this thread made a lot of sense for me.

Can you assist with an alternative solution so that we will be able to only change colors for manual links within posts’ content only?

Post count: 35449

Hi yourbackupemployee,

Please try this custom css for changing only the links from inside the posts -> https://i.imgur.com/T3s90W1.png
.single .td-container .td-post-content p a {
color: #0000FF;
}

Hope this will help you, if not, please provide me a link to your website, in this way I will be able to provide a better custom css.

Thank you!

Post count: 22

Thanks a bunch Calin, will give this a try!

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