AtulHost
  • Business
    • Career and Education
    • Finance and Investments
    • Marketing Strategies
  • Productivity
  • Technology
    • Consumer Electronics
    • Solar Energy
  • Tutorials

How to remove website (URL) field from WordPress comments?

By AtulHost in Tutorials ⋅ January 7th, 2021
Facebook Tweet LinkedIn

WordPress bloggers who loves content sharing and engaging their followers uses comment section to express opinions of other fellow bloggers and readers. But that comment section is also the most spammed section in the WordPress, as you know there are end numbers of annoying scrappers, auto comment bots, and similar tools that spam the WordPress’s comment section for free back links.

The only way to limit such kind of spam comments to either install an anti spam plugin which is not user friendly (annoying for authentic users) or removing the website field all together like below one.

WordPress comment section

I know the second one is way more useful if you really want to get rid of those spam comments. In this article we’ll see how to remove website (URL) field from WordPress comments.

Add the following code in the theme’s function.php file and save it:

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

Make sure you backup the site before adding the above code.

To see the immediate effect remove the cache (if any) and load your website in view some recent articles. You’ll notice that the website field is gone from the comment section.

Content is tagged with comments, web dev, wordpress.
Facebook Tweet LinkedIn

You’ll also like:

  • How to reduce server response times?
  • Nginx Config (Explained by Example)
  • How to create a website?
  • How to moderate the comments?
  • The best blogging platforms.
  • How to Achieve the AWS Cloud Certification Easily?
  • How to disable lazy load in WordPress?
  • Query Strings Remover: WordPress Plugin
  • How to reduce initial server response time?
  • How to deal with negative comments on your blog?

Published by AtulHost

Atul is a creative blogger who loves to do experiments with the latest business initiatives and tech trends like automation, artificial intelligence, cloud and edge computing, data science, hardware as well as networking, and the internet of things.

Make a comment Cancel reply

Required fields are asterisked and your email address will not be shared.

Subscribe

Recent Posts

  • HR trends for 2021
  • How to pick the right financing company for your customers
  • How to reduce initial server response time?
  • What every ecommerce business needs to know when it comes to product images
  • What is shared hosting?
  • How your online business can be everything a customer needs it to be?
Taking care of communication within your small business
Cool business ideas

We serve cookies on this site to offer the excellent user service.

  • About
  • Contact
  • Privacy Policy
  • Terms and Conditions
  • Write for Us
This website and its content are copyrighted © 2014-2021 by atulhost.com and individual contributors.