• chcw

    (@chcw)


    Hi,

    I am using the latest version of WordPress. I find in the comment box, there will always be a field ‘website’. Is it possible to remove this field completely, the only fields I need is the ‘comment’, ‘name’ and ’email’.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator t-p

    (@t-p)

    try adding this snippet to the functions.php of your theme:

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

    consider creating a child theme otherwise all your customization will be overwritten when you next update your theme.

    Anonymous User 14885823

    (@anonymized-14885823)

    Hello!!

    This page has a few options for removing the url/website field from the comments. The second option is probably easiest.
    Are you able to edit your theme’s functions.php file?

    Good luck!

    Thread Starter chcw

    (@chcw)

    Hi,

    Thank you very much for your replies.

    To Tara:

    Child theme seems rather complex if I only need to modify a simple setting?

    To Dphyled:

    Thank you very much. I read the page and find

    1. Option 2 has the problem that whenever the theme is upgraded, it will be overwritten.
    2. Option 1 said to modify the comment form. But I check http://crunchify.com/wordpress-comment-form-customization/ and don’t know which file should I modify. Is it a file from WordPress standard installation package?

    I just feel strange that when link spam is so popular, why WordPress does not provide a simple option to disable it?

    Anonymous User 14885823

    (@anonymized-14885823)

    Yeah, the “Option 2” would be best with a child theme so that things aren’t overwritten when you update. Child themes may seem a little complex if you haven’t done anything like that before, but there are good directions for setting up your child theme (like on the page Tara linked to). It doesn’t take very long, and you can learn a lot about how to customize your website. And once you have set up the child theme, you can make any other changes in the future to that child theme too!

    On the page I linked to, there was also an option 3. Did you try that out? I haven’t tried it, but I think it’s probably just a lightweight plugin that does the same thing as either option 1 or 2. That would probably easy to quickly install, and might do the trick for you.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘How to remove the website field when commeting?’ is closed to new replies.