How to Remove Website Field From WordPress Comments Form
We all know that WordPress is fully customizable and can be customized to a large extent. WordPress is best for large Repository of plugins and Resources. What happens if I want to disable the URL form the comment module? This prevents automated robots from posting spam links to your site. Its Helps your site and keep the SEO juice.
Remove Website Field From WordPress Comments Form
Option 1:
You Can Install This plugin and easily remove the website url from comment form.
Option 2:
Insert the following code in your theme functions.php file
//comment form url remove function from_comment_website_url_remove($fields) { if(isset($fields['url'])) unset($fields['url']); return $fields; } add_filter('comment_form_default_fields', 'from_comment_website_url_remove');
The code above creates a function called from_comment_website_url_remove() and removes the URL field form your comment form.
Using the WordPress Hook add_filter(), we pass the argument to $default WordPress function comment_form_default_fields that contains fields of comment form.