Remove the “website” field from WordPress comments

For most blogs, comment spam is the biggest issue they have to deal with and they’re deleting it manually each and every day.

By default WordPress comment form has three field s(name, email, and website or URL). The website field in the WordPress comments form that appears at the end of each often attracts spammers that use it to promote their shady links. For many WordPress bloggers, comment spam is one of the biggest issues they deal with and they are deleting the comments manually each day.

If you chose to disable the website field though, it may discourage people that leave comments only to insert links to quickly leave your website.

To remove the website field simply paste the following code to the functions.php file.

//Remove Website URL field from WordPress Comment Form
add_filter(‘comment_form_default_fields’, ‘remove_url_from_comment_form’);
function remove_url_from_comment_form($fields){
if(isset($fields[‘url’]))
unset($fields[‘url’]);
return $fields;
}

If you decide to keep your website field here are a few tips to help you keep the spammers away.

Tip 1:

The Akismet plugin proves to be a very good tool and it also learns and evolves every single day based on data collected from other websites and communities.

Tip 2:

Go to Dashboard >> Settings >> Discussion and uncheck Allow link notifications from other blogs (pingbacks and trackbacks). Most of the Pingbacks and Trackbacks are spam and the rest is almost useless.

Tip 3:

Use Capcha in your comments.

Do you want to build a flawless WordPress site? 

Related Blogs

Web developer
Symfony-PHP-Developer_02
Quick question?