Forums

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

  1. jdqt
    Member
    Posted 5 months 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. makeupedia
    Member
    Posted 4 months 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
    Theme Diva & Forum Moderator
    Posted 4 months ago #

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

  4. makeupedia
    Member
    Posted 4 months ago #

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

  5. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

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

  6. makeupedia
    Member
    Posted 4 months ago #

    Hmm does this say anything about my problem?

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

  7. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

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

Reply

You must log in to post.

About this Topic