How to Remove the Website URL Field from the Comment Form in WordPress

The URL field in the WordPress comments form is a constant pain – either spammers are using it to drop shady links, or readers feel compelled to fill it with garbage just to fill in the field. So how do you get rid of it?

Open up your theme’s functions.php file and add the following code to the end of the file:

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

Leave comment