Support » Fixing WordPress » Getting rid of website and email requirements for commenting

  • Resolved Marius-


    Is this possible?
    I don’t see the point in requiring users to input their supposed websites and emails when they comment, so I would like to remove these fields from the comment forms.

    I only want Name, and Comment, nothing else. This is to make it as easy and logic as possible for users to comment on my website. I tried looking around in the settings of the admin-tools, but with no luck.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Well, I can see that you’re fearless about spam comments 🙂
    In any case, you would have to delete the website and email requirements from your comments in your theme’s omments.php
    Make a backup of your comments.php and look for something like the following and delete it:

    <p><label for="email">Mail (will not be published) <?php if ($req) echo "(required)"; ?></label>
    <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
    <p><label for="url">Website</label>
    <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />

    Yeah I don’t mind real users spamming. But I wonder, will Akismet still be able to filter out spambots?

    Easier approach would be to hide the fields and autocomplete them…

    WP will likely expect these fields, so just removing them may not have the desired effect.

    I could be wrong though..

    How do you “hide” the fields then?



    Forum Moderator

    Website could be removed. It’s not a required field, IIRC.

    Fields and their labels can be hidden from (almost) everything by adding a class to the enclosing <p> or <div and then styling that class using display:none;.

    <input type="hidden">
    .. if i’m not mistaken..



    Forum Moderator

    On the markup that mercime suggested, that would leave the form label in clear view.

    yeah esmi, could you give me the exact code I need so I can just paste it in?


    How could it leave the label in clear view when I suggested to DELETE email and website markups?

    I tested locally what mercime suggested and it works.

    In admin dashboard –> Settings –> Discussions, you have to uncheck “Comment author must fill name and email”, otherwise it will require the email input.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Getting rid of website and email requirements for commenting’ is closed to new replies.