Want to Remove the website field from WordPress comments. Don’t want to show the URL field in your comments area. There are many natural methods to remove the website field from WordPress comments. This article will give you 4 simple ways to remove the URL field from your WordPress comments area.
Hint: Everyone loves to have a fast and secure website. We suggest Rocket.net, the most secured and fastest managed WordPress hosting service that gives you a Cloudflare Enterprise plan for free. Our readers get a special 50% discount on all Rocket.net plans using the coupon code: VWANT50.
When you don’t want to spend time, you can hire a freelance WordPress developer from any one of the top freelance websites like Fiverr. Ready to learn, continue reading this article.
Why should I remove website filed?
Usually, any website will get many spam comments. If you use Akismet plugin, you can avoid automatic spam comments which are generated from bots. But still, there is a chance that you will get manual spam comments. You may know that, when you click on comment author name, that will redirect you to his website which was placed in the website field of comments. Because of this, many bloggers use comments area for getting backlinks.
Of course, if you remove website field, you will get less number of comments. But you will get only genuine comments without website field. So removing website field is the best method to avoid manual spam comments.
- Related: 10 Essential WordPress Plugins list You Must Have
- Don’t Publish any post without configuring WordPress settings
Remove website field from WordPress comments
1.Editing CSS
Video Tutorial:
This video exactly shows you where to place the code given below. Watch it to avoid any mistakes. But if you are in rush, just copy the code from the steps below and paste on your WordPress website.
This is the simple and easiest method that I am using. Just with a single line, you can achieve your goal. You can use the Jetpack CSS feature to add custom CSS. If you want to know complete details about editing CSS read 3 Simple methods to edit WordPress theme CSS style.
Go to Appearance -> Edit CSS -> Additional CSS. Copy below code and paste there.
#commentform .comment-form-url {display:none;}
Check below screenshot for reference.
2.Using comments.php file
I don’t recommend you use this method. You need to access your theme’s comments.php file using the file manager. I am using Genesis framework. Your case may be different.
Go to cPanel -> File Manager -> Public_html -> Wp-Content -> Themes -> Genesis -> comments.php
But I did not find actual content in this file. So I went to
cPanel -> File Manager -> Public_html -> Wp-Content -> Themes -> Genesis -> lib ->structure -> comments.php
I have got below file.
You need to comment or delete $url field completely which is shown in above screenshot. But removing anything from core theme is not recommended.
3.Using theme functions.php file
This method is also very simple method. You will have to create one function and replace the existing comments function with your function. Remember, even a small mistake to functions.php file, will make your website down. So make sure that you have taken backup of functions.php file before editing.
Go to Appearance -> Editor -> functions.php. Paste below code at the end of the functions file. If you see any error after editing functions file, remoe edits by going to cPanel -> File manager -> public_html -> wp-content -> themes -> your theme name -> functions.php and edit that file to remove edits what you made.
//* Remove URL field from comments
function remove_url_comments($fields) {
unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields','remove_url_comments');
Check below screenshot for reference.
4.Using a WordPress plugin
There are many plugins that remove fields from comments. You can use Remove Fields or Remove Comment Website/URL box or disable-hide-comment-URL.
Conclusion:
Among all methods, I don’t recommend you to use a plugin for small things. I prefer to use the first method through which you can hide the URL field using the CSS method. Let us know which method you are using to Remove the website field from WordPress comments. If you like this article, please share this article. Want more blogging tips, follow BlogVwant on Facebook, Twitter, and Youtube
Hi Jinka, the first method is fantastic, thank you so much!
i used the first method and it works.
thank you very much
Really Great CSS is working perfectly……. 🙂 🙂
Very usefull post.
I quote the function.php method. It woks well: i’ve edited the file function.php in my child theme.
With the CSS method I can make visible and edit the field through the inspector: users will not read the link but the robots will… if the comment is approved.
(Excuse my English)
Tks a lot!
Check your text “Save my name, email, and WEBSITE…”
Thanks! The CSS worked great for me!
The first way works for me. Just empty cache after editing
you’re article is nice.
Thanks. CSS worked well for me.
Thanks for the post. I would be careful about the plugins. The first two haven’t been updated in a well over a year; both were last tested with WP version 4.5.10, released in April 2016, Even worse, disable-hide-comment-url hasn’t been updated in two years and was last test with WP version 3.2.1, released in July 2011. All three should be considered very out-of-date and likely abandoned by the developers.
I know this post was just updated a few days ago, but I would mention that.
The PHP or CSS code is the best way to approach this.
Hello Jinka!
The CSS version does not work for me 🙁
That worked for me. You need to check for class ID of your comment form URL using the procedure given in http://blogvwant.com/edit-wordpress-theme-css-style/
If you have different CSS class or id, you need to replace #commentform .comment-form-url with them.