How to Remove URL / Website Field from WordPress Comment Form?

How to Remove URL / Website Field from WordPress Comment Form?

wordpress-commnet-form-spamWordPress has a great feature – WordPress Comment form. Visitors generally give their feedback or ask their queries using comment form. This also reflects the popularity of the website. But often, this comment form is misused by spammers by adding spam comments with their website URL in WordPress comments form.

Even after installing anti-spam plugins like Akismet or using CDN like Cloudflare, some comments manage to bypass all WordPress security. so, website owners generally looking for how to remove the URL field from the WordPress comment form.

In this article, we’ll implement the solution using 3 ways – adding code snippet in functions.php file, using WordPress plugin, editing comment-template.php file

The final result will be something lke this:


remove website field from wordpress comment form
remove website field from wordpress comment form


Option 1 – Adding code snippet

You just have to add a small code in your WordPress Functions.php file, which is located in your themes folder.

Adding this code will remove “Website Name” field from your WordPress comment form.

I STRONGLY suggest you to make a backup of original functions.php file, before you make changes in that file. That will help you to restore, if something goes wrong.

Also, make changes in your child theme.

Option 2 – Using WordPress Plugin

WordPress has a useful plugin called “disable-hide-comment-url” which will allow you to remove the URL option from the comment box. This prevents automated bots to post spam links on your website. It helps your website retain the SEO Juice. This is a lightweight very simple plugin. No Javascript, ajax hack.

READ  How to Control or Disable Default Post Revisions in Wordpress?

You may download this plugin from here.

Option 3 – Editing comment-template.php file

You can also edit comment-template.php file, which is located inside wp-includes folder of your WordPress. The code of the file is something like this:

wordpress comment-template.php file
Edit comment-template.php file to remove website URL field

Remove the 2 lines that start with ‘url’

Although, I’ve given this solution here, but I do not recommend it. The reason being – this file gets updated with new code, whenever you update WordPress with the new version. In that case, you need to edit the same file again.

Also, your wordpress anti-virus like Wordfence, may give false report of malware / virus, if you make any changes in WordPress default files.


How to Remove URL / Website Field from WordPress Comment Form?
5 (100%) 3 votes

Leave a Comment

Subscribe Updates, Its FREE!

Email ID: