How To Remove Website Field From Comment Form

by Imran Shariff on April 22, 2011

Stopping comment form spam from website field

I never had an intend to post this article on how to remove website field from the comment form, till one of my friend requested me to help him to remove the website field from his blog where he publishes exam results from all the universities from India.

Last week I had visited SEOMMOtips.com and happened to read this post for the first time and also left a comment not knowing the same wordpress hack I will be posting here.

Suresh had removed URL field from his another blog ICTTrends.com to safe guard from lots of unwanted comments which are not related to the post and was the same issue with theexamresult.com

It is obvious that the comments were spam as the website comment field were being used to spam URLs to generate traffic, though these days most of the blog are no-follow which does not give any credit, but most of the legitimate users also ends up posting non existing urls in the website comment field, thinking its mandatory requirement.

How to remove URL field from comment form?

There many other ways of doing this hacks but the most easiest way and safest is to create a small plugin for removing the Website Field from the comment form.

comment form url before How To Remove Website Field From Comment Form

Creating a Plugin to remove Website field from comment form.

1. Create this plugin using notepad application from windows and remember to save the file with a .php extension Eg : removeurl.php

2. Copy and paste the below code in the file created in step 1

<?php
/*
Plugin Name: Remove Website Field
Description: Removes the website field from the comments form
*/
add_filter('comment_form_default_fields', 'url_filtered');
function url_filtered($fields)
{
  if(isset($fields['url']))
   unset($fields['url']);
  return $fields;
}
?>

Plugin Credit goes to TechHacking.com

3. Save your changes and upload it via FTP or through your web hosts file manager to the /wp-content/plugins/ directory

4. Go plugins menu option in your wordpress admin area and activate the plugin.  With this simple hack you will be to remove the website field from the comment form.

If  in any case the plugin does not work or the function does not work you can also use this method, I used this method in lot of my customization work and its proved to be very effect without any problem.

To do so open your theme main css (Style Sheet) copy and paste below code

#commentform #url, #commentform #url +label {display:none;}

and save file and for thesis users you can paste the above css code in custom.css or base.css if you are using skin plugin from thesisthemes.com

comment form url after How To Remove Website Field From Comment Form

If you have any problems using this in your blog, you can always post your queries in our commenting section and I will try to solve ASAP.

View all posts by
Blog → Visit Author's Blog

Follow Us On

@shariffdotorg facebook

Article by Imran Shariff

Imran Shariff is a Full-time blogger, web designer and the man behind this blog who is working very hard to keep the quality. The only aim of starting this blog is to share all the knowledge and information by experimenting on various platform.

Imran has written 67 awesome articles for Shariffdotorg

{ 24 comments… read them below or add one }

Simon Payne from nba online April 22, 2011 at 7:12 am

This is a very innovative innovation for bloggers who wish to keep websites in anonymity. I was actually looking that someone should come up with this solution & help bloggers like me who wishes to keep anonymity over certain areas of blogging. I tried your method & it worked just fine for me. Thanks…

Reply

Kumaha Aing April 22, 2011 at 3:01 pm

thank for share this tips
Kumaha Aing recently posted..Komodo Island is The New 7 Wonders of The WorldMy Profile

Reply

Best hosting service April 25, 2011 at 7:00 am

Your every post is innovative for me, And i learn so many thing from this website. Thanks for sharing these tips.

Reply

Shariff April 25, 2011 at 11:34 am

Thanks Shiv, I am glad you liked it and hoping to provide more valuable stuff for my blog readers.

-Imran

Reply

Website and Internet May 1, 2011 at 2:13 am

Hi Sharif,

I was dropped here by the keyword of “how to remove website field in comment”, and I’m glad that I found this great blog. I believe more information that I will get from here since I’m newbie in blogging. BTW thanks for this guidelines. It was helped me a lot. If you don’t mind can we become a friend. I was add you in my buddy list at Twitter.

Best regard,
Danial
Website and Internet recently posted..How To Stop Thumbsucking In ChildrenMy Profile

Reply

Shariff May 1, 2011 at 3:48 am

Hi Danial,

You are welcome you can also fellow me on @shariffdotorg and we can also talk on gtalk and skype my username shariffse

It is always nice to get some good and positive comments, it motivate us to write more and with lots of information helping other, Wordpress is just an Awesome CMS and very search engine friendly, with lots of easy to use features. I will be starting a separate new blog that provide details information from basics to advance level. I am presently thinking for a good design for design my new blog.

Thanks for stopping by and commenting.
-Imran

Reply

Website and Internet May 1, 2011 at 4:51 am

I don’t have Skype account. Do you have a Yahoo messenger ID?

Yes I agree. Before this I never know about blogging. My 1st blogging experience is with blogger. But after everybody talked about the intensity of WordPress, I’m curious about that. And after using it about 5-6months, I definitely love it. The best is, WordPress got lots of new exciting experience which attract me to learn more. And with this such nice blog, I believe that I can learn more from you.

Danial
Website and Internet recently posted..How To Stop Thumbsucking In ChildrenMy Profile

Reply

Shariff May 1, 2011 at 2:52 pm

Hi Danial,

My yahoo ID also the same shariffse, I rarely use yahoo. however I have been experimenting with wordPress from past 3 years and learning a lot after becoming a blogger I have updated my knowledge. If you have query or problem with regard to wordpress just shoot me a mail at socialme [at] shariff dot org. I will try my best to help.

-Imran

Reply

Website and Internet May 2, 2011 at 12:23 pm

Hi Sharif,

Can you give me your full Gmail ID so that I can add in my Gtalk contact. Thanks..

Danial
Website and Internet recently posted..How To Stop Thumbsucking In ChildrenMy Profile

Harsh Agrawal May 1, 2011 at 6:27 pm

This is useful but for a blog like yours which talks about Blogging, SEO I wont suggest removing website link box as most of readers will be bloggers and would always like to comment along with Website link …
Harsh Agrawal recently posted..How to Make Free iPhone Ringtones Using iTunesMy Profile

Reply

Website and Internet May 2, 2011 at 12:32 pm

I agree. But sometimes you need to consider if those comments can add some informative value or not. People should know how to comment other blogs politely. I always hold the phrase of “Giving before Given”. Giving some valuable information first before you get the rewards.

I also hate to remove the website field. But due to huge of spammers commenting with the irrelevant topic, I have to do that. I found some of commenter on my blog is not offering a linkback. So if he/she don’t wants to help others, why we should help him/her by let their link on our blogs?
Website and Internet recently posted..How To Stop Thumbsucking In ChildrenMy Profile

Reply

Kimi May 2, 2011 at 1:23 pm

Hi Imran,

Great tutorial, I guess I remember one of my reader asked me a while back how to remove this field, but I did not give the answer or tutorial.

Next time I find the email, I will definitely share this valuable tut to this person.

Thanks!

Kimi.
Kimi recently posted..Add facebook comment to wordpress Video Sync FB Comments to WordPressMy Profile

Reply

Shariff May 2, 2011 at 2:42 pm

Hi Kimi,

Good to see your on my blog, and thanks you liked this tutorial. Any suggestion on the design part for further improvement. I would like to hear this from your soon.

-Imran

Reply

sameer May 12, 2011 at 4:58 pm

yes i done it thanks …

Reply

Online High School Diploma May 13, 2011 at 6:15 am

Such a nice article, i like it.

Reply

DRUPAL August 28, 2011 at 4:33 pm

thanks for the book.it is a nice subject.
DRUPAL recently posted..The Scrumptious Collection: Volume 1My Profile

Reply

Kumaha Aing September 2, 2011 at 8:04 am

Hi Shariff, how to create recent comment or active discussion on wordpress blog, like this blog…
thank you so much.
Kumaha Aing recently posted..Adira Asuransi Kendaraan Terbaik IndonesiaMy Profile

Reply

karthik September 6, 2011 at 10:07 am

coz of a person’s complaints itz affecting our future plz help us

Reply

Shariff September 6, 2011 at 11:52 am

Hi Karthik,

How could I help you.. you have not mention the your issue… you can get in touch with me on gtalk my username is shariffse.

Talk to you soon :)
Imran

Reply

arafinshaon from Windows 8 December 30, 2011 at 7:04 am

On the Dashboard, go to Appearance -> Editor -> Stylesheet (style.css) and add the following within the file:

#commentform #url, #commentform #url +label {display:none;}

Very Simple:) not need to do so many things you described.
arafinshaon@Windows 8 recently posted..How to Download Full Version Software for FreeMy Profile

Reply

Phiroz January 14, 2012 at 6:02 pm

Hi Shariff
I came here looking to suppress the comment box for a single page, but then realised that Thesis does not have the boxes for Name, Email, Website etc. How do you get that? Moreover I tried using the following css:
.custom.contact ##commentform {display:none;}
but did not work (I believe thesis allows us to use the page names as well). Could you please solve these queries?
Thanks

Reply

Shariff May 2, 2011 at 2:29 pm

Hi Danial,

Its shariffse@gmail.com i am always online on gtalk.

-Imran

Reply

Website and Internet May 2, 2011 at 3:41 pm

Added you in my on Gtalk. I will contact you soon. Need your advice. Thanks Imran
Website and Internet recently posted..How To Stop Thumbsucking In ChildrenMy Profile

Reply

Shariff May 2, 2011 at 4:14 pm

You are Welcome Danial but I am yet to receive your gtalk invitation.

-Imran

Reply

Leave a Comment

CommentLuv badge

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.

Previous post:

Next post: