0

I am using the Shamrock theme and I am happy with link colours on the main page however when you go into a blog post and hover over any links within the body they are red.

I have tried multiple things with CSS (after hours of googling as I do not know CSS) and without using !important and therefore changing ALL links I can't get just the links within the blog posts to change when hovering over them.

Is anyone able to help with this, please?

1
  • I would like the links to be this colour when hovering, #e164af – chxrlotterose May 4 '20 at 19:30
0

Found the answer! For anyone else with the this question, this worked for me:

.entry-content a:not(.more-link):not(.wp-block-button__link):hover {
    color: blue;
}

Change colour for one you prefer :)

0

You can use the page ID then set the class to reflect it.

For example:

body.page-id-1,body.page-id-2,body.page-id-3 {
     background-color: green !important;
}
7
  • Hey! Thanks for responding. How would I find the page ID? Sorry, don't know anything about CSS really and only managed to experiment with some stuff earlier by googling! – chxrlotterose May 4 '20 at 19:36
  • wpentire.com/page-id-wordpress – Josh hall May 4 '20 at 19:39
  • Brilliant, thank you. I've had a look through this and unfortunately, I don't think it will work for my blog as I don't have a page for it. My blog posts are visible from the home page, not via a separate one. – chxrlotterose May 4 '20 at 19:44
  • Cant you use your homepages ID if they appear there? – Josh hall May 4 '20 at 19:45
  • Tried searching how to find that out but can't seem to find an id for my homepage. – chxrlotterose May 4 '20 at 19:53
0

You can use the body class to nesting each anchor tag.

This is for the blog post page:

.blog a:hover {
    color: #e164af;
}

And, this is for the blog post detail pages:

.single a:hover {
    color: #e164af;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.