Matt Mullenweg has a very nice feature on his site wherein each of the comments you read on a post is numbered (for example). Now, all WordPress comments are automatically numbered, but these numbers don’t start at 1 for each post. For example, the first comment on my last post was #7700. So it takes a simple hack to get the comments to be numbered 1, 2, 3 and so forth on a given post.
The WordPress support forums give enough info to figure out how to do this, and supposedly it’s in the codex, but here’s how I did it (see the results on any page with comments).
First, we need to edit your wp-comments.php file (the “Comments Template” in the theme editor). Find this line:
and replace it with this:
Then, find this line:
and add this line right above it:
What we’ve done so far will create the counter. To make it show up, we add something like this below the comment byline code:
The byline has the “comment posted at … by … ” info, and should be pretty easy to spot.
If you want to just copy my comment template in its entirety, I’ve uploaded the source here.
After that, it’s all a matter of styling it the way you want it. I added this to my stylesheet (ripping off Matt for his CSS):
.comment-number {
color: #CCCCCC;
font-family: trebuchet, verdana, arial, sans-serif;
font-style: italic;
font-variant: normal;
font-weight: normal;
font-size: 40px;
line-height: normal;
font-size-adjust: none;
font-stretch: normal;
margin-top: -45px;
float: right;
}
No, not rocket science. Yes, pretty cool. Yes, I offer WordPress hosting and will answer any crazy question you can come up with. Phil asked about this, and, though he’s not a client, I thought it was cool enough a feature to implement. It’s not added to the theme yet, but will be next time I update it.


justin, you got an update for the WordPress spam words list? i’m getting hit harder than ever, and it appears more spams are getting past your excellent filter…
The only solution that works is Spam Karma 2.