Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing Hyperlink Colors

  • @danajoy2008

    Participant

    Hello!

    First: I’m using WordPress 4.1.1 running The Thinker Lite theme. I’m using bbPress 2.5.6 and my site is artintheblood.net.

    I would like to change the color of the hyperlinks that appear in posts on my forum. For example, I’d like to have them be blue. I went in yesterday in hopes of doing that, but when I made the changes via the bbPress style pack (which is completely brilliant), ALL of the links were changed. The topic titles, user names, everything.

    Is there a way to only change the color of links that appear within posts? Or is this just a lovely pipe dream that exists in my head?

    Thank you so much for any advice you can offer!

Viewing 25 replies - 1 through 25 (of 31 total)
  • @robkk

    Moderator

    try this example, change the colors/remove the text decoration to your liking.

    .bbpress bbp-topic-content a,
    .bbpress bbp-reply-content a {
        color: blue;
        text-decoration: underline;
    }

    @danajoy2008

    Participant

    Hi Robkk,

    Thanks so much for helping!

    My first gigantic question: Where am I supposed to put this example? I opened Editor, but I’m not sure where I’m supposed to go digging.

    Sorry for the abject ignorance. I do appreciate your help.

    @robkk

    Moderator

    @danajoy2008

    oh yeah sorry , put it anywhere you can add Custom CSS.

    your child themes style.css
    a standalone custom css plugin
    jetpack custom css module
    you can also place this into your bbpress.css file that should be in your child theme in a CSS folder.

    @danajoy2008

    Participant

    Okay, now I’ve broken my website!

    I tried to make the change in my jetpack module, and I’m getting the following error message:

    Parse error: syntax error, unexpected ‘.’ in /home/content/p3pnexwpnas10_data01/99/2483599/html/wp-content/themes/the-thinker-lite/inc/jetpack.php on line 8

    I can’t even get into my admin page now. Help!

    @robkk

    Moderator

    how did you make the change in the jetpack module??

    all you had to do was make sure you have the custom CSS module activated in Jetpack then go to Appearance > Edit CSS then place the snippet there.

    since i think you edited the plugin files which you dont need to.

    You setup FTP with your site which usually your server will have some kind of tutorial for setting up FTP.

    Then you go to wp-content > plugins > jetpack

    then rename the plugin to jetpack-deactive to deactivate it temporarily to see if that fixes the issue.

    Now you either revert what you changed in the plugin , or delete then reinstall Jetpack so you could get an unaltered version of the plugin.

    Then add the CSS in the instructions i gave you above.

    @danajoy2008

    Participant

    Thanks Robkk! I was able to fix and restore the site. Whew!

    I installed the Simple Custom CSS plugin and put in the code you suggested above.

    Nothing seems to have changed on the site, however. Do I need to give it more time to take effect?

    @robin-w

    Moderator

    Nothing seems to have changed on the site

    you may need to close down your browser and re-open it – many browsers don’t refresh css when the page is refreshed, so closing/re-opening is the best solution.

    Otherwise it should take immediate effect

    @danajoy2008

    Participant

    Hi Robin W,

    I closed out the browser and reopened it, and there was no change.
    I also tried using a different browser all together, and there wasn’t any change.

    Do you have any idea what I could have done wrong at this point? My steps so far, after repairing my website: I installed Simple Custom CSS, took Robkk’s example from above and put it in the Simple Custom CSS.

    Thanks for all of your help!

    @robin-w

    Moderator

    ok, Rob’s the css guru, but why not try my plugin

    https://wordpress.org/plugins/bbp-style-pack/

    which will let you style the hyperlinks (no. 5 in forum index styling)

    Otherwise come back and we’ll help further

    @danajoy2008

    Participant

    I have your plugin (which is awesome!), and when I made the adjustment there, it changed all of the hyperlinks everywhere, including the ones in the titles of topic posts, the names of users and so forth.

    I was originally asking if there was a way to limit what gets colored blue – for example, only the hyperlinks that appear within posts.

    Like I said above, if this isn’t possible, I totally understand. I just wanted to make sure one way or the other before I just gave up on the concept.

    @robkk

    Moderator

    if this isn’t possible, I totally understand.

    no its possible , i forgot some periods though.

    Here should be the full code , not shortened though.

    #bbpress-forums div.bbp-topic-content a,
    #bbpress-forums div.bbp-reply-content a {
        color: blue;
        text-decoration: underline;
    }

    if it still doesnt work , post a topic that has a couple links in the replies and topic post and i can find some CSS that would work with your theme.

    @robin-w

    Moderator

    thanks Rob ! Far better at css than me !

    @danajoy2008

    Participant

    Rob,

    I cut and pasted the code from your last reply to me into the Simple Custom CSS, saved it, and then opened a new browser and checked the site. Still no change.

    Should I post a brand new topic post here with the links and whatnot? Or put the links in a reply here? I’m sorry I’m not sure – I don’t want to make a new post if that’s not what you are asking me to do.

    Thank you all both for being so patient and helpful. I really, really appreciate it.

    @robkk

    Moderator

    you dont have to make a new topic/reply if you can find an existing topic and reply that has a link in each.

    @danajoy2008

    Participant

    I’m so sorry — I thought you might want me to make a new topic here on this bbPress support site. I would have happily made a new post on my own website!

    I think this is what you need, but if not, please do let me know.

    "The Changing Role of Legacy Characters"

    @robkk

    Moderator

    @danajoy2008

    i see its using my CSS that i gave you above

    it also works for the reply i just didnt take a pic of that.

    can you not see it like this??

    it might be a cache issue.

    disable caching for logged in users , cache plugins usually recommend this for membership sites lik sites that have forums.

    There should be an option in whatever cache plugin you are using.

    @robkk

    Moderator

    here is the reply

    @danajoy2008

    Participant

    Oh wow, no I can’t see that!

    Let me go see if disabling caching for logged in users does the trick — I’m sure it will.

    Thank you!!

    @danajoy2008

    Participant

    I’ve cleared the cache, but I’m still working on how to disable caching for logged in users.

    Now I can see the blue links! Brilliant!

    I know this is totally looking the gift horse in the mouth, but maybe it’s easy? Is there a way to make it so that the Favorite and Subscribe buttons aren’t blue too? Those only show up for logged in users. If they have to stay blue, that’s fine — I’m so excited that the links in the posts are blue that I will overlook it in a heartbeat!

    @robkk

    Moderator

    I’m still working on how to disable caching for logged in users.

    what cache plugin are you using??

    Is there a way to make it so that the Favorite and Subscribe buttons aren’t blue too?

    here i think i copied how the sidebar links are shown.

    .bbpress a.favorite-toggle,
    .bbpress a.subscription-toggle {
        color: #000;
    }
    
    .bbpress a.favorite-toggle:hover,
    .bbpress a.subscription-toggle:hover {
        color: #707070;
    }
    

    @danajoy2008

    Participant

    That is an excellent question — I don’t have any cache plugin listed, as being either activated or deactivated. That’s part of what’s confusing the daylights out of me. I have a “flush cache” option at the top on the admin page, and when I clicked that, I was able to see the blue links.

    Thanks so much for the extra code! You’re brilliant!

    @robkk

    Moderator

    @danajoy2008

    do you know where the flush cache button came from??

    @danajoy2008

    Participant

    I’m really not sure — I have no record of installing a cache plugin, and I can’t recall when I noticed that button up there. I’m totally confused.

    I’ve put the code your posted above into the Simple Custom CSS, but the Favorite and Subscribe buttons are still blue. Was there something I was supposed to do besides just cutting and pasting?

    Also, this is strange: After I clicked on “flush cache,” I could immediately see the blue links when I had the site open in Chrome. When I open Firefox and pull up the site, I can’t see any blue — it’s all gray again.

    @robkk

    Moderator

    @danajoy2008

    I’m really not sure — I have no record of installing a cache plugin, and I can’t recall when I noticed that button up there. I’m totally confused.

    can it be your host?? or you could be using something like Wordfence that also has caching in it??

    I’ve put the code your posted above into the Simple Custom CSS, but the Favorite and Subscribe buttons are still blue. Was there something I was supposed to do besides just cutting and pasting?

    i probably need to add more classes to the CSS code.

    Also, this is strange: After I clicked on “flush cache,” I could immediately see the blue links when I had the site open in Chrome. When I open Firefox and pull up the site, I can’t see any blue — it’s all gray again.

    it might also be collected browser cache on your CPU, not 100% sure though.
    i think i had that problem before.

    @danajoy2008

    Participant

    I could certainly contact the host and see if it’s something they did. I’m 100% positive I don’t have Wordfence, and I don’t *think* I have anything like it, but I will go double-check. I did open Filezilla and I searched for “cache” — I found a cache.php file, but I didn’t even attempt to go mucking about in there!

    I’m a little glad to hear that you’ve possibly had a similar problem; maybe I can ask some other people on the site to try out different browsers and see if I need to go clean out my CPU cache.

    If you have a chance to add more classes to the CSS code, I would be extremely grateful. I really appreciate the time and effort you’ve spent on my issues.

Viewing 25 replies - 1 through 25 (of 31 total)
  • You must be logged in to reply to this topic.
Skip to toolbar