Removing Website Field From WordPress Comment Form

you can certainly remove the website field from the comment form with the help of a code snippet.
SVG-files-on-WordPress-banner

Some users always want to learn how to do things manually instead of using a plugin. The good news is that you can certainly remove the website field from the comment form with the help of a code snippet.

To get started, you need to take a full backup of your WordPress site. This will help you to restore your website files in case you break anything while editing the theme files.

Next, you need to copy and paste the following code to your theme’s functions.php file or a site-specific plugin:


   //** *Disable website field from comment form.*/
    add_filter('comment_form_default_fields', 'unset_url_field');
function unset_url_field($fields){
    if(isset($fields['url']))
       unset($fields['url']);
       return $fields;
}

This code simply removes the website field from your WordPress comment form. You can visit a blog post on your website in a new incognito tab to see it in action.

We hope this article helped you to learn how to remove the website URL field from the WordPress comment form.

You may also want to check out our guide on how to add reCAPTCHA to WordPress comments to prevent spam comments. For more tips, also see our 12 vital tips to combat comment spam in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Find more Tutorials like this in the Tutorials section.

Leave a Comment

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

Latest Video

For more videos, visit the channel.

Recent Posts

Please Read

This website totally runs on ads, and it would help alot if you just click on one or two ads whenever you visit this website.
Not asking for any kind of donation, just click on any one of  ads. That would help keeping this website alive.
   
Thank You
for your support!