Spammers are attracted to WordPress blogs because they can leave their name and have it hyperlinked to their website to create a valuable link.

Instead of encouraging such spam, or having to moderate comments to delete spammy name links, why not simply delete the option to submit a website?

Our point of reference is the Mandigo theme, which we love, but this procedure should be universal across Wordpress blogs.

What you want to do is from the Theme Editor find the comments.php file.

About 3/4 of the way down there will be a section where you see the input requests if someone is not logged into your blog. The requests ask for the person’s name, email address, and website url.

Here is the code requesting the url:


<p><input type="text" name="url" id="url" value="<? php echo $comment_author_url; ?> "size="22" tabindex="3" /> 
	<label for="url"><small><?php _e('Website', 'mandigo'); ?></small></label></p>

Simply delete this code. Problem solved and it will not affect your blog because this is not a required field (unlike the name and email fields.)

Now, the only way a spammer can leave a link is if they post a link in the comments portion of the field. By moderating the discussion so that any comments are held if their contain one or more links, the spammer is stopped cold.

Copy the code below to your web site.
x 
4 Responses to “How to Delete Website URL Field from Wordpress Comments Form”
  1. Thank you! I looked for a plug in to do this for like an hour today before I found your blog. Works perfectly!

  2. Merry Miller says:

    I found your site on del.icio.us today and really liked it.. i bookmarked it and will be back to check it out some more later.

  3. Hello i have the same problem users are promoting sites on my site’s comment section so i want to remove the site url field but i can’t see anywhere comment.php file but there is one file called wp-comment.php i opened that and look for the above code but i can’t find that code in wp-comment.php file.

    So please help me to remove that field.

  4. The post below explains how to remove the website field from the comment form. Since it’s not specific to theme or core files, it should work in all recent and future versions of Wordpress.

    http://techhacking.com/2011/02/04/stop-comment-form-spam-in-the-website-field/

Leave a Reply