Adding a Comment Policy To Your WordPress Comments.php

After continuing to be inundated by commenters who leave keywords instead of name@keywords I decided I had to be more upfront about the commenting policy on  This prompted me to edit my theme comments.php and add a statement right before the username field that clearly spells out what a commenter should leave in that field.


Do you think this clearly spells out that I don’t want “KEYWORDS” instead of a name?  I am still getting those who leave keywords instead of a name and since it is getting through the GASP plugin it either must be a manual user not reading even this simple statement or somehow there are bots defeating the GASP plugin and auto submitting.

Meanwhile, for anyone else who wants to add a simple statement to their comment box you can do so easily by opening up your themes comments.php file and modifying it as such.

Search for the section that looks like this:  (note, it would be the first field input for the form and it may say “name, username or something similar”

Simply add anything you want before this input text, and it should display above it, in my case all I did was add this line before the above lines:

Commenting Policy:  Do not use just "keywords" for Name, you must leave a real name, but you can use name@keywords if you like.  All comments subject to moderation.

Depending on your theme you may have to fit the custom statement before, after or inside of a <div> tag for formatting purposes so make sure you backup your comments.php file first by copying it to a local text editor and saving it.  Then experiment and use one word first until you get the location and placement correct.

It is easy to add a commenting policy to your WordPress comments.php file but I am still not so sure everyone reads what you put here, so far though it may have helped a little.  At least now when I trash a comment for non-compliance if a user comes back and asks why their comment doesn’t show up I can say that my commenting policy clearly spells out what they are doing wrong.

-Dragon Blogger

Share Feedback We Want to Hear From You