• Categories
    • Tutorials
    • Beginners Guide
    • WordPress News
    • WordPress Security
    • Best WordPress Plugins
    • WordPress Themes
    • Product Reviews
    • WP Tips & Tricks
  • Guides
    • Start a Blog
    • Make a Website
    • WordPress Hosting
  • Themes
    • Elegant Themes
    • Thrive Themes
    • OptimizePress
  • Hosting Reviews
    • WPEngine
    • Flywheel
    • A2 Hosting
    • SiteGround
    • Kinsta
  • Coupons
    • WPEngine
    • Flywheel
    • HostGator
    • A2 Hosting
WordPress Tutorials

How to Remove the Website Field From the Comment Form

Last Updated on: July 26, 2013 Dev Sharma 22 Comments

How to Remove the Website Field From the Comment Form

Last month, I made a lot of small improvements here at WP Kube and one of them was removing website field from the comment form.

Ever since I started the blog, I was getting a bunch of spam comments (and most of those were human spammers who were just commenting for backlinks).

I tried Livefyre & Disqus but didn’t liked it.

I always loved the default commenting system and there’s no way I could use another commenting system. So I decided to enhance the functionality of default WordPress commenting system.

By default the WordPress comment form has the website field and there is no simple way to disable it.

To remove the website field from the comment form, paste the below code into your functions.php file.

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

For Genesis Users

If you’re using Genesis theme then paste the below code in your functions.php file (the functions.php file can be found in your child theme)

add_filter( 'genesis_comment_form_args', 'url_filtered' );
add_filter( 'comment_form_default_fields', 'url_filtered' );
function url_filtered( $fields ) {

if ( isset( $fields['url'] ) )
unset( $fields['url'] );

if ( isset( $fields['fields']['url'] ) )
unset( $fields['fields']['url'] );

return $fields;
}

For Thesis Users

Thesis has built their own commenting system, so the best way to remove the field would be editing the thesis core files or using a css to hide the website field.

To hide the website field with css, please paste the below code in your custom.css file

.custom #commentform input[name="url"],  .custom #commentform label[for="url"] { display:none; }

That’s it. I hope that this tutorial has helped you in removing the website field from the comment form.

+ Share
Disclosure

Dev Sharma

Devesh is the founder of WPKube. He has been building and managing WordPress websites for 8+ years and has been featured in Forbes, HuffPo, Entrepreneur, and more! Follow him on Twitter.

Related Posts

Back to all articles
  • Implementing a GraphQL server with components in PHP

    Implementing a GraphQL server with components in PHP

  • How to Start a WordPress Blog (Step by Step Guide)

  • How to add HTTPS and SSL to WordPress – Step by Step Guide!

Coupons

View more deals
  • Nexcess coupon code
    Save 40%

    Nexcess Coupon

    Looking to save money on managed hosting from Nexcess?
    Get This Deal
  • 33% OFF

    Flywheel Hosting Coupon

    Hosting isn’t always the most simple portion of your websit
    Get This Deal
  • TailorBrands
    25% Off

    Tailor Brands Coupon

    Looking for a Tailor Brands coupon to save on your own custom log
    Get This Deal
22 Comments Leave a Reply
  1. Brad Dalton says

    October 20, 2012 at 10:49 am

    Excellent. Thanks Devesh!

    Reply
    • Devesh says

      October 23, 2012 at 3:49 am

      Thanks for the comment, Brad.

      Reply
  2. Carolyn says

    October 20, 2012 at 1:25 pm

    Hi Devesh, Have you found that this has been an effective way of getting rid of spammers? This change would be good for those who just want links back to their sites. Could you just make your blog a no-follow blog instead?

    Also, this would prevent CommentLuv from being used which is a great way of encouraging commenters. I’m wondering if you have found that you have fewer commenters as well as fewer spammers.

    Thanks for sharing this!

    Reply
    • Devesh says

      October 23, 2012 at 4:28 am

      Hey Carolyn,

      I know this is not the most effective way of getting rid of spammers, but I think it depends on what type of site you’re running. I can make this blog a no-follow instead but that won’t stop spammers to leaving comments.

      I still get a lot of spam comments but far less then what I was getting a few months ago.

      Yeah, I do know this blog gets fewer commenters as well as fewer spammers but I am not really after comments. I think having fewer quality comments is much better then having 10+ low quality comments (that are there just for backlinks & traffic).

      Thanks for sharing your insights, Carolyn. I appreciate your great support.

      Reply
  3. Rahul Kuntala says

    October 23, 2012 at 11:29 am

    Hi Dev,

    Great insights (I read even the comments too).

    But how would you find someone who makes thoughtful comments on your blog?

    Reply
    • tonygreene113 @ 113tidbits says

      October 23, 2012 at 9:04 pm

      Maybe he can track them via the email address. But that would be a helluva lot of extra work to get a conversation on a topic.

      Reply
  4. Jeeva says

    October 31, 2012 at 3:19 am

    Thanks, Devesh. Worked like a charm on a Genesis Theme (Focus). Appreciate you sharing this very much.

    Reply
  5. Cristiano says

    March 6, 2013 at 3:42 pm

    I have the need to remove all three fields. and leave only the big field (field description).
    is it possible?

    Reply
    • Cristiano says

      March 6, 2013 at 3:43 pm

      …about Genesis Theme…

      Reply
      • Cristiano says

        March 6, 2013 at 4:15 pm

        /** dcdcdcdcdcdc Rimuovere la funzione Info messaggio */
        add_filter( ‘genesis_comment_form_args’, ‘url_filtered’ );
        add_filter( ‘comment_form_default_fields’, ‘url_filtered’ );
        function url_filtered( $fields ) {

        if ( isset( $fields[‘url’] ) )
        unset( $fields[‘url’] );

        if ( isset( $fields[‘fields’][‘url’] ) )
        unset( $fields[‘fields’][‘url’] );

        return $fields;
        }

        /** dcdcdcdc Rimuovere la funzione Info messaggio */
        add_filter( ‘genesis_comment_form_args’, ’email_filtered’ );
        add_filter( ‘comment_form_default_fields’, ’email_filtered’ );
        function email_filtered( $fields ) {

        if ( isset( $fields[’email’] ) )
        unset( $fields[’email’] );

        if ( isset( $fields[‘fields’][’email’] ) )
        unset( $fields[‘fields’][’email’] );

        return $fields;
        }

        /** dcdc Rimuovere la funzione Info messaggio */
        add_filter( ‘genesis_comment_form_args’, ‘name_filtered’ );
        add_filter( ‘comment_form_default_fields’, ‘name_filtered’ );
        function name_filtered( $fields ) {

        if ( isset( $fields[‘name’] ) )
        unset( $fields[‘name’] );

        if ( isset( $fields[‘fields’][‘name’] ) )
        unset( $fields[‘fields’][‘name’] );

        return $fields;
        }

        Reply
        • Dave says

          July 18, 2013 at 2:39 pm

          I tried this code to remove the ’email’ option from the comments form:

          /** dcdcdcdc Rimuovere la funzione Info messaggio */
          add_filter( ‘genesis_comment_form_args’, ‘email_filtered’ );
          add_filter( ‘comment_form_default_fields’, ‘email_filtered’ );
          function email_filtered( $fields ) {

          if ( isset( $fields[’email’] ) )
          unset( $fields[’email’] );

          if ( isset( $fields[‘fields’][’email’] ) )
          unset( $fields[‘fields’][’email’] );

          return $fields;
          }

          But it did nothing. Any other suggestions?

          Reply
          • Devesh says

            July 19, 2013 at 2:16 am

            Hi Dave,

            I just visited your site and it looks like you were able to remove the website field.

            Reply
            • Dave says

              July 19, 2013 at 10:13 am

              Hi Devesh,

              Yeah, it did remove the website field. Thanks for the post. I know it is off topic, but some also asked for the removal of: [website] option in the comments. And I was hoping someone had the code for that too for Genesis.

              thnx for the blogpost

              (btw: your website speed is very slow)

              Reply
              • Devesh says

                July 20, 2013 at 1:07 am

                Hi Dave,

                I’ll look into it and see if I can get something for removing the email id.

                Regarding the speed, is it still loading slow?

                Reply
                • Dave says

                  July 20, 2013 at 9:44 am

                  thnx!

                  Yes speed is much better now! Big difference!

  6. Dean says

    April 3, 2013 at 4:00 am

    I’m using the Generate child theme in Genesis and this worked fine for me. The code snippets provided by StudioPress didn’t work – so thanks a bunch for posting this!

    Reply
    • Devesh says

      April 3, 2013 at 4:58 am

      Glad I could able to help you, Dean. Thanks for stopping by.

      Reply
  7. Gajendra Megajolla says

    April 16, 2013 at 4:58 am

    Amazing resource, thank you for spending your time and effort in putting this list. I will be happy to share this post..

    Reply
  8. Joseph Adediji says

    June 28, 2013 at 2:13 pm

    Great, I tried the first on my blog and it worked..
    Thumbs Up Dev.

    Reply
  9. Mounir says

    September 22, 2013 at 2:08 pm

    Thank you so much. I added your code to the end of functions.php just as you instructed and it work beautifully!

    Reply
    • Devesh says

      October 1, 2013 at 5:00 am

      Glad I could able to help you, Mounir. Thanks for the comment.

      Reply
  10. Shin says

    April 21, 2014 at 5:07 pm

    Is it possible to selectively remove a comment field (say a custom field) ‘only’ from the comment-reply form?
    for example my main comment form has a website/location field, but I don’t want to ask people who reply to an existing thread to have to fill in that extra information.

    Reply

Leave a Reply Cancel reply

Full Disclosure This post may contain affiliate links, meaning that if you click on one of the links and purchase an item, we may receive a commission (at no additional cost to you). All opinions are our own and we do not accept payments for positive reviews.

Our Newsletter

Get awesome content delivered straight to your inbox.

loader

THE BEST OF WPKUBE

Some of the best content we have published so far.

BEGINNER GUIDES & REVIEWS

1How to Start a WordPress Blog (Step by Step Guide)
2How to Install WordPress - The Complete Guide
36 Best Options for Managed WordPress Hosting Compared
4The 7 Best WordPress Hosting Providers for 2021 Compared
5Top 9 Landing Page Plugins for WordPress (2020)
69 Best List Building Plugins for WordPress In 2021
7How to Fix the 500 Internal Server Error on Your WordPress Website
8Beaver Builder Review: Is it The Best Page Builder Plugin for WordPress (2021)?
9What is a Gravatar and Why You Should Get One
10Thrive Themes Review: A Look At The Full Membership
117 Best WordPress Migration Plugins Reviewed and Compared for 2021
12OptimizePress Review: Create Landing Pages with Ease
13How to Make a Website: Complete Beginner's Guide
14WordPress.com vs WordPress.org: Which is Best for Me?
15Top 22 Best Free Stock Photo Resources For Your Site
1617 of the Best Google Fonts (And How to Use Them in WordPress)
17LifterLMS Review: Is it The Ultimate WordPress LMS Plugin?
18How To Fix '503 Service Unavailable' WordPress Error
1911 Best Contact Form Plugins for WordPress in 2021
20How to Use BackupBuddy – The Best Backup Solution for WP??
21How to Add a Custom Logo to Your WordPress Site
22Kinsta Review: Real Test Data + My Likes And Dislikes
23How to Fix Error Establishing a Database Connection in WordPress
24Thrive Architect Review 2020 – Best Landing Page Plugin for WordPress!

Exclusive deals

Flywheel Elegant Themes Coupon WPEngine Coupon A2 Hosting

WPX Hosting: 50% OFF

Save 50% on WPX Hosting using our exclusive coupon code.

Get this Deal

Flywheel(our review)

Featured In Forbes Huffpost Entrepreneur SEJ

About WPKube

WPKube is an online WordPress resource which focuses on WordPress tutorials, How-to’s, guides, plugins, news, and more. We aim to provide the most comprehensive beginner’s guides to anything about WordPress — from installing plugins, themes, automated installs and setups, to creating and setting up pages for your website.

We have over 500+ tutorials, guides, product reviews, tips, and tricks about WordPress. Founded by Devesh Sharma, the main goal of this site is to provide useful information on anything and everything WordPress.

Useful Links

  • Behind the Scenes
  • Beginner Guides
  • WordPress Hosting
  • WooCommerce Themes
  • MeridianThemes
  • Exclusive WordPress Deals
View All Guides »

Reviews

  • WPEngine 33% OFF
  • Thrive Leads
  • Flywheel 33% OFF
  • Divi Theme 20% OFF
  • Thrive Architect
  • Elegant Themes
Reviews »

Deals

  • InMotion Hosting
  • LifterLMS Coupon
  • LiquidWeb Coupon
  • WPEngine Coupon
  • A2 Hosting
More Deals »
© Copyright 2020 WPKube ® All Rights Reserved.
  • About
  • Contact
  • Site Terms
  • Disclosure
  • Privacy Policy