Changing the Color of Hyperlinks in the Body Only

  • Unknown's avatar

    Hi! I recently updated my theme and the hyperlinks are now light grey. As a result, the hyperlinks are almost invisible. I’ve tried to add custom CSS to rectify this, but it has always resulted in the titles of blog posts, and the social icons etc. on the home page and elsewhere also changing color. Ideally, I’d like the hyperlinks just in the body of text in each blog post to be blue, everything else to remain black. Can I do this?

    Thanks,

    Anna

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi dear .

    Please try below code :

    .footer-widget-area a {
    color : blue;
    }

    Thanks.

  • Unknown's avatar

    Hi @arey1127gmailcom, we can use the following to affect only the hyperlinks within the entry content area of pages and posts.

    .entry-content a {
      color: blue;
    }
    
  • Unknown's avatar

    I have this problem. I changed the font on my blog in the customiser and now all my hyperlinks have changed to black, the same as the rest of the text. How can I get them to change back to blue?

  • Unknown's avatar

    Hi @myhorsegatsby, can we have a link to the site you are talking about?

  • Unknown's avatar

    Hi, I have fixed it now by changing the colour palette back. The site is https//:michellelegrandart.wordpress.com using Altofocus. It was caused by changing the colour palette to one of the predefined choices of black and white. The only way I could fix it was by choosing a different colour palette – then all the hyperlinks had the blue colour restored automatically in the posts. It’s a shame because I preferred the black and white palette but I couldn’t see any way around it. Many thanks.

  • Unknown's avatar

    Glad you got things working.

    The pallette colors can be overridden with custom CSS if you should decide to switch back. It does require the use of the
    !important
    keyword since the custom palette colors have a higher priority in CSS loading, but it can be done.

  • The topic ‘Changing the Color of Hyperlinks in the Body Only’ is closed to new replies.