WordPress Unstyle Comment Replies Plugin

Download the plugin from WordPress.org

Here you’ll find the lackluster documentation for the WordPress Unstyle Comment Replies Plugin that I’ve created. If this gains some traction, I’ll provide more info, but here are the basics.

WordPress’ recent change with comment thread styling has made it impossible to have “zebra” striping on just the parent comment entries, since the internal counter includes the children while counting. As a result, I’ve created this plugin which removes the “even”, “odd”, and “alt” (by default) classes from these elements, and allows you to add your own. The plugin has its own counter which only counts parents – marked by having a class of “depth-1″ somewhere. I realize this isn’t foolproof, but works fine with WordPress 2.7.1.

Once the plugin is installed, you’ll have a new option under Settings, Unstyle Comment Replies. Here, you can enter in any styles you want to remove from the parent and child elements, and also list the classes you wish to add. For removing the styles, use one per line.

For adding styles, you can specify several on a line, separated by spaces. In this case, each line represents a loop through the parent comments. So you can have “even” and “odd”, to have two color striping, or do “red”, “blue”, and “green” for three color striping. Or have 16777215 color striping, if that’s how you roll. (Though 216 would be safer.) Or you can have “even really-even” on one line to have these two classes on the even rows, and “odd really-really-strange” will both be applied to the odd rows.

For example, these settings:

Unstyle Comment Replies Option Settings

Will give you this output:

Unstyle Comment Replies Resulting Code

Note that the default even and odd styles have been replaced. Here’s how that page actually looks in real life.

That’s all there is to it. This software is provided without any warranty, guarantee, or support. So try and figure it out yourself first – I may not have time to reply to every email.