Archived topic
Change link color in content but not Titles on home page
7 replies · Started by Cynthia on August 17, 2021
Hello. I am trying to change the color of the links in my blog posts. I changed the color in customizing>color>content but it ended up changing my title colors on the homepage as well. Is there a way I can change the color of one and not the other? Thanks
Hi there,
Any chance you can link us to the site in question?
You can use the private information field:
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
Yes
Hi Cynthia,
You can keep the link color you've set on Appearance > Customize > Colors and then custom style the post titles on the home page with this CSS:
h3.wp-show-posts-entry-title a {
color: red;
}
This CSS completely overrides the effects of the customizer setting on the post titles on your home page.
Change red to the color of your preference.
Thank you! I think I take one step forward and two steps back :( I changed the color as you indicated and it worked-yay! In the same section there is a date just below the title that is also showing blue on some of them. Could you share what code I would use for that. I tried on my own but couldn't do it. Thanks *will leave site in private info
You can try this:
span.wp-show-posts-posted-on a {
color: red;
}
span.wp-show-posts-posted-on a:hover {
color: green;
}
And for the title, I forgot to add this:
h3.wp-show-posts-entry-title a:hover {
color: green;
}
The CSS selectors with the :hover are stylings for when the text link is hovered by the mouse pointer. You can change green to your preference. :D
Perfect. Thank you!
No problem. :D