One of my clients came to me with a problem: people would leave comments and those who didn’t have a website would type n/a, none, or some other random word in the website field when leaving a comment. It seems they didn’t realize they could leave it blank if they didn’t have a website or blog to link to.
This was a relatively simple problem to fix with only one small tweak to the comments.php and comments-popup.php template files. Delete the website input field from the form. In the end, it didn’t hurt the number of comments left; however, it did cut down on the number of comments with random text for websites.
I’m sure you’re wondering what those people who do have a website are to do. Well, those people generally figured out they can place the link in the actual comment body or that they can register for an account on the blog (if registration is allowed) and add the link in their profile.
In your theme folder, locate the comments.php and comments-popup.php template files. The example below will assume you’re using the default (Kubrick) theme.
Make sure to back up your files before editing, then find the following and delete it (or comment it out):<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /> <label for="url"><small>Website</small></label></p>
(To comment out a block of code, add
<!--before it and
This may not be the ideal solution for every blog, but it’s a healthy solution for blogs that get a lot of non-blog-savvy readers. An alternative would be to add a note before the website field asking readers without a website to leave the field blank. (By the way, I’ve tried the alternative with marginal success. Some people simply don’t read, comprehend, or follow instructions well.)