WordPress.org

Ready to get started?Download WordPress

Forums

How do I get .bypostauthor to work with this code? (7 posts)

  1. jdqt
    Member
    Posted 2 years ago #

    I've been messing around with this for a while now, been searching and all I can find is stuff dedicated to li.

    I want to highlight the author comments, with maybe another background color of the div or maybe some other color on the author name.

    Since I'm not so fancy at this stuff I cant solve it, do anyone know how I can fix it?

    http://pastebin.com/4aFW50Gv

  2. Caroline
    Member
    Posted 2 years ago #

    I have the same problem, i've tried these two examples for CSS, but I have no idea of what code and where to insert in the loop.

    .bypostauthor {
    background:#FFF;
    }
    .commentlist .bypostauthor {
    background:#FFF;
    }
  3. esmi
    Forum Moderator
    Posted 2 years ago #

    If you use wp_list_comments, WordPress will add all of the classes you need to the comment markup.

  4. Caroline
    Member
    Posted 2 years ago #

    I do that, but there are no bypostauthor or author in my comments.php. I use Twenty Ten.

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    There are in all of my themes and I always use wp_list_comments - usually without any custom callback.

  6. Caroline
    Member
    Posted 2 years ago #

    Hmm does this say anything about my problem?

    wp_list_comments( array( 'callback' => 'twentyten_comment' ) );

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    Yes - you need to look at the twentyten_comment() callback function.

Topic Closed

This topic has been closed to new replies.

About this Topic