Skip to content

How To Remove Website Field From WordPress Comment Form

If you run a WordPress site with themes, reviews, shopping, and all, then you might want to remove Website field from the comment form of your WordPress. A shopping or theme website doesn’t need a website option. It could be used for product reviews or if they created a support tickets theme that does not require a URL field.

It’s also a great way to prevent spam comments from your blog. Just add following snippet to your functions.php file and it’s done:

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

 

Leave a Reply

Your email address will not be published. Required fields are marked *