Comment Form – E-mail Not Required!

I need to know how to make one of the fields on my comment not NOT required. How can I set the e-mail field in the comment field to not be required, but optional?

Related posts

Leave a Reply

1 comment

  1. Settings > Discussion > Other comment settings > uncheck Comment author must fill out name and e-mail

    Update

    Well, as far as WP is concerned these are glued together. You can add your own check for empty name, something like this (not tested):

    add_filter('preprocess_comment', 'require_comment_author');
    
    function require_comment_author($commentdata) {
    
        if ('' == $commentdata['comment_author'])
            wp_die('Error: please enter a valid name.');
    
        return $commentdata;
    }
    

    But then will also need to modify form generation so name is marked up as required and email not…