How to Remove Website Field from Comment Form in WordPress

Updated: September 14, 2022

There may be many times when you expect feedback or a reply from the visitors to your posts, turns out you have to deal with a bunch of spam comments which may lower the quality of your comments section and make your site appear less professional. One of the trademark characteristics of spam comments is irrelevant links. These URLs may lead users to malicious sites where they could become victims of cybersecurity attacks. And for that reason, you may want to remove the website field from the WordPress comment feature.

The default comment setting which you can tweak at Setting Discussion from your WordPress dashboard let you take control of some of the comment systems such as allowing comments on new posts or imposing requirements to fill out a name and email to comment. However, to remove the website field, you may need to use another method which we will show you later.

In this article, we will show you how to remove the website field from commenting feature in two ways:

Removing Website Field from Comment with a WordPress Plugin

Whenever you want to add an additional feature or want to solve some issue on your WordPress site, the first place you may want to try is the WordPress plugin repository ( To remove the website field from your commenting feature, you can check out the Advanced Comment Form plugin by Thomas Maier.

The Advanced Comment Form plugin allows you to remove the website and email field from the comment form and insert custom text before or after the form.

Removing the website field with the plugin is very easy. First, you need to install and activate the plugin. Once activated, navigate to Comment → Comment Form from your WordPress dashboard then continue by activating the remove website field option by ticking the checkbox. Finish by saving the changes by clicking the Save Changes button.

Removing Website Field from Comment Without Plugin

This time, we will show you how to remove the website field from commenting feature without using a plugin. Instead, you will use a custom code to achieve that task. However, before you start, you may want to back up your site and use a child theme to avoid breaking the parent theme or losing your changes when you update your theme.

Once you’re ready, navigate to Appearance  Theme File Editor from your WordPress dashboard. Once you’ve arrived at the Edit Themes page, open the functions.php file from the Theme Files list by clicking it. Continue by copying the following code:

add_filter('comment_form_default_fields', 'website_remove');
  function website_remove($fields)
         return $fields;

You can place the custom code in your functions.php file under the PHP tag <?php and outside of any existing function.

Once the code is in place, save the changes by clicking the Update File button at the bottom of the page.

Now, your comment feature will lose the website field which was the target for spam comments irrelevant and malicious URLs.

The Bottom Line

Unfortunately, not everything goes the way you expected from the commenting feature of WordPress. You may often have to deal with a bunch of spam comments with irrelevant links on your WordPress site instead of the type of comments you expected when you wrote your articles. This article shows you how to remove the Website field from comments. If you want to stop the spam comments, you may want to read the previous article we wrote about how to stop spam comments in WordPress.

This page may contain affiliate links, which help support WP Pagebuilders. Learn more

Leave a Comment

Pin It on Pinterest

Thanks for commenting

Help us grow by sharing this post with your friends!

Join 500+ WordPress users receiving tips and insights on creating with WordPress in the no-code era.


How long have you been using WordPress? If you are an old WordPress user, then you have been a witness how WordPress has evolved massively. It has gone from a merely blogging tool into a comprehensive website builder. You can now use WordPress to create any type of website. From e-commerce website, LMS, listing website, membership website, to social media website.

Do you know what’s more interesting?

You can create your website with WordPress without touching a single line of code. At WP Pagebuilders, we write a lot about how to get the most out of WordPress in the no-code era. Subscribe and be first to know our newest content.