Comment spam is a major issue for many blogs, caused by the desire to create backlinks using the website field in WordPress comment forms. The spam is usually generated by automated bots, but can be combated with free tools and plugins. By removing the website field from the comment form, the number of spam comments can be significantly reduced. The spam comments are posted for SEO purposes, using specific keywords for backlinks, but this practice is not effective for SEO. By following specific instructions, users can manually remove the website field from the comment form using code in the functions.php file.
Comment spam is a big problem for many blogs. The biggest reason for comment spam is the desire to create backlinks by using the website field in the WordPress comment form.
Since most spam is generated by automated bots, you can easily combat comment spam using free tools and plugins.
To keep your website from being diluted by spam, I will guide you to remove the website field from the comment form.
Why do people post SPAM comments?
The short answer to that question is SEO or search engine optimization. Let’s dig deeper!
Have you ever received comments from users like “Best WordPress Theme”, “Make Money Online” or “MyBlog Name” on your website? Why do they use such keywords instead of their real names?
By default, WordPress comment form has four fields: name, email, website URL, and comment box.
When displaying comments, WordPress will automatically associate the commenter’s name with the website URL they provided.
This backlink provides an incentive for black hat SEO marketers and new bloggers. They believe that this practice can help them rank better for specific keywords in search engines.
This technique does not work for SEO in most cases.
This is why I completely removed the URL field from the WordPress comment form. By doing this, I have significantly reduced the number of spam comments on my site.
Real people will leave comments on your posts whether they get a backlink or not. If someone doesn’t want to comment on your site because they don’t get a backlink, then you really have to question their intentions in the first place.
Here are specific instructions for removing the website field from the comment form.
Remove website field from WordPress comment form
Some users always want to learn how to do things manually instead of using a plugin. You can remove the website field from the comment form with the help of code.
To start, you need to make a complete backup of your WordPress site. This will help you restore your site files in case you mess anything up while editing theme files.
Next, you need to copy and paste the following code into your theme or child theme’s functions.php file:
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 your website blog post in an incognito tab to see it in action.
Epilogue
I hope this article helped you learn how to remove the website URL field.
If you find it interesting, you can follow the basic WordPress section to learn more new knowledge.
Follow fanpage to receive the latest articles: Hocwordpress Group