• I want the name and e-mail for my comments.php (based on WordPress Default) file to be required. I only get a wp-comments-post.php error message when I submit with a blank comment box.

    Here’s what the code says:

    <p><input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
    
    <p><input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>

    Am I missing a file? Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Admin/Settings/Discussion. Tick “Comment author must fill out name and e-mail”.

    Thread Starter Rocknation

    (@rocknation)

    I knew I was overlooking something…thanks to you, I can now use the file as a guestbook, which will give me one less plug-in to babysit. Thanks again!

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

The topic ‘comments.php not working’ is closed to new replies.