How to remove the website field from WordPress comment form

In this tutorial, we are going to remove the Website URL field from WordPress comment form that appears at the end of each post. This can be useful to stop spammers from inserting their dumb links into your website.

Useful Read: How to disable theme and plugin editor from WordPress dashboard?

How to remove the Website URL field from WordPress comment form

How to remove the Website URL field from WordPress comment form

To Remove the Website field, paste the following code in Your 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;
}

 

0 Comments

Leave a Comment.