To Remove URL from WordPress Comments

Add this code to the functions.php file of the active theme:

add_filter('comment_form_default_fields', 'unset_url_field');
function unset_url_field($fields){
	if(isset($fields['url']))
	unset($fields['url']);
	return $fields;
}

When this is in place, a normal user will not see the URL field. If you get messages posted that still have a URL, you know it is SPAM and can junk it.

Leave a Comment