Removing Website URL field from WordPress default comment form

Remove website URL-from WordPress comment form
Website URL field is available by default in WordPress comment form. Disabling this field is possible without using plugin using function.php

There are two ways to remove WordPress default website URL field in comment form from each article page. One by using WordPress plugins and other by adding a small snippet code in function.php file.

As WordPress speed and optimization are our top priorities in maintaining WP blogs, we will be using the second method of adding short snippet code in function.php file in our applied themes. Using a plugin to execute this function will impact of performance directly. So its always recommended to use less number of plugins.

Adding code snippet is pretty easy, below are steps to follow:

Related:  WordPress deflate by Gzip compression with .htaccess file

Note: Please note that function.php files is very critical file in WordPress. If anything goes wrong then your website will be down. So make sure to get a backup of files that are being edited.

  1. Login to WordPress blog
  2. Go to Dashboard
  3. Click on Appearance tab from left pane.
  4. Click on Edit under Appearance tab.
  5. Select theme to be edited from drop down at right upper corner.
  6. Click on function.php from right pane.
  7. Copy and paste below code at the bottom of all other and click on Submit/ Save.

Below the filter code that needs to be added in function.php file:

Related:  Remove Apache password prompt for WordPress Admin

Once this code is added, clear your cache plugin and refresh the article or blog post page. There will be no website URL field in comment form.

WordPress comment form without website URL

WordPress comment form without website URL

Note and Conclusion:

Make sure that you have  a backup of files that are being edited (function.php). Also do not forget to clear cache plugin to make these changes effective. Also, read more about how to disable the website URL field in bbPress forum.

You may also like...

1 Response

  1. Gulshan Kumar says:

    Oh my god! Finally got here a useful solution to prevent spammer. Thank You so much dear. I was looking for this article from very long time. Few min ago I landed to smartgeek blog, and I found this article.

Leave a Reply

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