How to: Style author comments in WordPress 2.7

December 31, 2008 at 8:53 am

Due to the new comments system in WordPress 2.7, and the wp_list_comments() function, you have to change the way you style author comments. But don’t worry, I’m going to show you how to do.

With previous WordPress versions, you had to use some hacks to be able to give a special style to author comments. But this isn’t needed with the brand new WordPress 2.7: A specific CSS class is automatically added by WP to author and registered users comments.

To style author and registered users on WordPress 2.7, simply paste the following code in your style.css file, and style at your taste :)

li.bypostauthor { 
    /* CSS styles for author comments */
}

li.byuser { 
    /* CSS styles for registered users comments */
}