I’ve gotten a lot of comments about how I do my comments page and figured I would share how I do it! Granted not all of the styles are in my style sheet, that is due to pure laziness on my part when I was writing it up.

I use the following WordPress plugins specifically for the comments page:

For the rounded edges I use the following CSS3:


This chunk of code enables you to have alternating colors in the comments but also let’s you define in your CSS, a class to specifically customize the author (your) comments.

Place at the very top of the page, this defines the CSS class you will use for the alternating color row in your comments.

$oddcomment = 'alt';

This also starts the comment loop.

<?php if ( have_comments() ) : ?>
<?php $i = 0; ?>
<?php foreach ($comments as $comment) : ?>
<?php $i  ; ?>
//Test for author comment
if($comment->user_id == "1") {
$authorcomment ='me';
$commentclass = $oddcomment . ' ' . $authorcomment;
$authorcomment = '';
$commentclass = $oddcomment;
<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type == 'comment') { ?>

I offer my comments page in its entirety. If you have any questions about it or if you want to use any part of it (such as the comment guidelines) just comment!

{Download comments.txt}

Important Message

This post is over a year old which means the information may be outdated or no longer be accurate.

share this post

share on pinterest share on twitter share on facebook share on google plus

Stay up to Date

Carrie commented 12 times at OSN!

thanks. i really like how your comment form includes a box for twitter id and i had downloaded the plugin but couldn’t figure out how to make it look nice. being able to see your code i’ll be able to get it worked out.
.-= {shared blog entry – Free iTunes Awesomeness: Nothing Suits Me Like a Suit} =-.

FB @ FabulouslyBroke.com commented 1 times at OSN!

Thanks so much for the tip on how your comments page is formatted with the Twitter ID!

What a great idea
.-= {shared blog entry – One Dollar Bill Y’all…} =-.

Damita commented 115 times at OSN!

Wow thanks for sharing hun :)
.-= {shared blog entry – Yet more snow…} =-.

Damita commented 115 times at OSN!

Can I use it at digital-damita.net?? Also I can’t seem to get cufon keeps saving that I haven’t choose a font when I have any ideas?
.-= {shared blog entry – Yet more snow…} =-.

Sarah tweets at  & has commented 3929 times at OSN!

@Carrie also remember that you can style your form elements to make it look even better! I like the twitter field since twitter is so prevalent these days.

@FB you are so very welcome! I like to think I do things slightly differently around here, at least enough so that when I do posts like this, it helps someone out!

@Damita with Cufon 1. are you converting the font properly 2. putting the font.js file in the proper place

Of course I would prefer you customize it a bit/link back for credit, remove my img link lol but of course you can use it!

Carrie commented 12 times at OSN!

any ideas how to get it to save the twitter id if it’s been previously entered so that it already shows up as filled in?
.-= {shared blog entry – Free iTunes Awesomeness: Nothing Suits Me Like a Suit} =-.

Sarah tweets at  & has commented 3929 times at OSN!

@Carrie you would manually have to do that via say PHPmyAdmin or enable cookies OR if you use firefox for your browser, I like the easyComment addon.

Generally most browsers should save entered form information so that it shows up automatically.

Carrie commented 12 times at OSN!

i use firefox and it saves all the other fields but not the twitter id
.-= {shared blog entry – Free iTunes Awesomeness: Nothing Suits Me Like a Suit} =-.

Caitlin commented 19 times at OSN!

I love this, thank you! I only have one question – how do you get your comments to be a different color than everyone else?

Caity tweets at  & has commented 132 times at OSN!


Sarah tweets at  & has commented 3929 times at OSN!

@Carrie I tried to duplicate the issue you’re having with the twitter id on my box and sure enough firefox saved the field for me. I wonder if it’s a cookie issue or something perhaps?

@Caitlin I explained in the entry on how to have it set a special CSS class for the author of the entry, it’s all contained as well, in the comments.txt file.

@Caity you are very welcome!

Caitlin commented 19 times at OSN!

Thanks Sarah, I think I missed it. That’s what happens when you try to play around late at night ;)

Tom commented 15 times at OSN!

Comments. Jeesh. This section alone has taken up most of my attention during the last 3 days of my theming time.

I looked at your comments.txt (is this your comments.php renamed for viewing?) and I don’t recognize a bit of it.

What I’m working on (just for styling the comment area) is the setup from here:

Q1 – how/where do YOU classes to the php/html for your comment area?

Q2 – “how do I style the twitter id field once it’s displayed in the comments area?” – and/or “how do I tell WP ‘the info from this twitter form should be given this styling class’?”

Your id’s and classes in your comments section (I checked them out with firebug :) are basic and descriptive – the ones I’m working with suck. And I can’t really “see” what info it’s getting from the db, I just have to crap around w/Firebug and “reverse engineer” my styling.

wp_list_comments is what I have in my comments.php that actually “brings” the HTML output – and I can’t find any other location in my WP install that contains the rest of the mystery – do you use wp_list_comments or are you “rolling your own” comments page via php commands you’ve specified?

PS – not going to make my Feb 1 deadline. bah. it’s not for lack of effort, though.
.-= {shared blog entry – Rag Quilt} =-.

Tom commented 15 times at OSN!

…and now that I’ve spent ~1 hour searching for the answer and typing the above comment, I seem to have figured it out for myself by just tinkering w/ the plugin settings. jeesh.

Sorry if you got excited about the chance to answer all those questions, you may proceed if you’d like (I am curious how you’ve done the back-end class designations) but it’s no emergency, I can continue to live in ignorance – it’s not like I don’t have more to sort out. ha.
.-= {shared blog entry – Rag Quilt} =-.

Sarah tweets at  & has commented 3929 times at OSN!

@Tom yep that is my comments.php! I think mine are more “descriptive” because I coded from ground up. Everything for the most part is in my CSS, with the exception of lazy coding when it comes to areas like the “stay up to date” for example.

I do NOT use wp_list_comments but have each section broken down. So author here, avatar there, comment over there… etc.

Penny commented 14 times at OSN!

I’m glad I read thru all the comments here. I thought I was the only person left in the blogosphere NOT using wp_list_comments.
shared blog post – How NOT to comment on blogs

Sarah tweets at  & has commented 3929 times at OSN!

I actually made a custom function now so technically I NOW use wp_list_comments but with the same stuff as in that text file up for grabs.

So in my CURRENT comments.php I pull it as such

<?php wp_list_comments('style=div&

callback=osn_comment'); ?>
Tom commented 15 times at OSN!

ONE more question – how do you get the ” t ” twitter icon in front of the commenter’s twitter id link?

I tried setting it up on the twitterlink plugin page, and I keep getting the message “Some HTML tags were stripped (not in list of allowed tags)”

Sarah tweets at  & has commented 3929 times at OSN!

@Tom, I actually edited the plugin to do that.

Nadia commented 2 times at OSN!

I love your comments page, its gorgeous! I’d love to know how to have the same set up except with different colors…. or maybe the colors do go with my site i dont know..
the only change I would make is that I wouldn’t want the postcard part, i would just want a white box. Your site is such a valuable resource and i am so glad i found it! (from the problogger sitsgirl challenge).

My wordpress site isn’t live, its still in the test stage.. I’d love your help though! :)
shared blog post – Toddler Racket Ball

Sarah tweets at  & has commented 3929 times at OSN!

Thank you! Well this entry basically offers a download to “copy” what I’ve done with my comments page.

Feel free to ask any questions and if you need help with anything, I am available for hire!

Leave a Reply

Your email address will not be published. Required fields are marked *

I'm thrilled that you have chosen to leave a comment! Please keep in mind that comments are moderated according to my comment policy.

CommentLuv badge

Subscribe via Email

© 2001-2017
All graphics, written content, & photos are copyright to
unless otherwise stated.
copyright, privacy, and even more policies