• Hopefully this is fairly simple but I just can’t figure it out. The default link colour for my site is a bright blue. On one page, this really doesn’t go with the background colour and I’d like to change it but can’t find a simple way of changing all the links on that page

    I’ve been googling this and have found lots of solutions but none that fit. Many say to use the <span> and the html to change the colour before each link, but this page will eventually have hundreds of links so it will be a pain to do this for each.

    Is there a quick way to do this?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter weezypops

    (@weezypops)

    Edit: I’ve managed to change some by clicking into the word, highlighting half of it, changing the colour then doing the other half, but this doesn’t really feel like the ‘right’ way of doing it!

    Hi weezypopz!

    I am Rahul and I would like to help you out here with your issue.

    Before I provide solution can you please let me know the following things?
    1. WordPress version.
    2. Current active Theme

    I have following solution for you if you want to try it. Paste the following code in your style.css file of current active theme:

    .post a span{color:#22aadd !important;}

    If you find this solution working then you can use it or let me know if you are still facing issues.

    Regards,
    Rahul

    Thread Starter weezypops

    (@weezypops)

    Hi, won’t that change it in all posts though? I just want to do it in this one.

    I’m using Poseidon and my version is 4.8.2

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Every page has a unique class added to the body. On the page you reference, it’s

    <body class="post-template-default single single-post postid-54 single-format-standard">

    So you can use .postid-54 as a selector to make any CSS specific to that page.

    Something like .postid-54 a { color: #123456; } is what you want.

    To add CSS:

    • If you are using WordPress 4.7 or later, use the “Additional CSS” option in the customizer.
    • If your theme has a custom CSS option, use that to add the CSS shown above.

    Learn to use the Chrome Developer Tools to help you see and test changes to your CSS.

    Thread Starter weezypops

    (@weezypops)

    Thanks, I tried adding

    .postid-54 a { color: #123456; }

    to the additional css box in the customizer (thinking I would just change the colour afterwards) but it doesn’t seem to have changed anything. Is that all I needed to do? Thanks.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    1. If you’re putting colors directly in via the editor, that will override the CSS.

    2. You put the CSS inside a comment block /* .... */. Put the CSS *after* the comment block.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Changing link colour in one post’ is closed to new replies.