Style author comments in WordPress 2.7

December 31, 2008 · Print This Article

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.

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 */
}


Your choice for site templates and wordpress themes

Comments

One Response to “Style author comments in WordPress 2.7”

  1. Posts about Wordpress 2.7 as of December 31, 2008 | The Lessnau Lounge on January 1st, 2009 3:54 am

    […] of my blog. I also updated my blog to version 2.7, and I’m very happy with version 2.7. Why Style author comments in WordPress 2.7 – livexp.net 12/31/2008 Due to the new comments system in WordPress 2.7, and the wp_list_comments() […]

Got something to say?

You must be logged in to post a comment.