How to Remove the Website Field From the Comment Form

Share this post:

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.

About the Author: Devesh Sharma is a WordPress fanatic and loves experimenting with WordPress themes & plugins.Get more from Devesh on  and Twitter.
22 comments… add one
  1. Carolyn says

    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!

    • Devesh says

      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.

  2. Rahul Kuntala says

    Hi Dev,

    Great insights (I read even the comments too).

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

    • tonygreene113 @ 113tidbits says

      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.

  3. Cristiano says

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

      • Cristiano says

        /** 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;
        }

        • Dave says

          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?

            • Dave says

              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)

              • Devesh says

                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?

  4. Dean says

    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!

  5. Gajendra Megajolla says

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

  6. Shin says

    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.

Leave a Reply

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.