WordPress.org

Ready to get started?Download WordPress

Forums

Changing Comments Link Color (7 posts)

  1. bradbice
    Member
    Posted 9 years ago #

    I want to be able to change the color of my No Comments/1 Comment/2 Comments link on my main page to red if there has been 1 or more comments. Where can I add a class name to attach CSS styles with?

  2. Lorelle
    Member
    Posted 9 years ago #

    CSS and the structure of the two WordPress Themes that come with the installation are discussed here, specifically aimed at the comments section:

    http://codex.wordpress.org/Site_Architecture_1.5#Comments

    Each theme may be a little different but this will help, along with this article that will help you find CSS styles and how to change them:

    http://codex.wordpress.org/Finding_Your_CSS_Styles

  3. jamjar
    Member
    Posted 9 years ago #

    I'm having the same problem as you Brad....on hover I have my comment link exactly as I want it. It's customizing the active part on the link that has me stumped.

  4. bradbice
    Member
    Posted 9 years ago #

    My problem isn't in changing the CSS styles, I've developed my own theme so I've done plenty of that.

    But I need to be able to attach a class name to the comments link ONLY if there has been 1 or more comments made. As you can see on my website, http://www.bradbice.com, the links are small and blue, but I want to make a link that says "1 Comment" or "5 Comments", etc. bold and red. But I want to keep the "No Comments" small and blue like the rest of the links.

    Can this be done?

  5. vkaryl
    Member
    Posted 9 years ago #

    You'll need some kind of conditional "if else" statement probably - I don't personally know how to do that. Kafkaesquí, macmanx, and Denis deBernardy are the gurus for that....

  6. bradbice
    Member
    Posted 9 years ago #

    Hmm, how do I approach them respectively?

  7. Michael Bishop

    Posted 9 years ago #

    You may want to start a new thread asking for help with conditonal tags and comments.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.