• Resolved saa67272

    (@saa67272)


    Hi all,

    I am trying to get rid of the ’email’ field that appear when a user goes to submit a comment. The things I’ve tried from googling around a bit do not seem to work.

    My understanding is that within the comments.php I need to pass some kind of customized array to the comments_form() method but the wordpress documentation for customizing this array is highly confusing (at least to me).

    I would appreciate any help with exact code I need to put into my comments.php to remove those two fields.

    I use latest version of wordpress 3.9.2 and Free Flato theme

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Remove this from your comments.php file:

    'email' =>
    '<div class="form-group comment-form-email">' .
    '<input id="email" class="form-control" name="email" type="text" placeholder="'. __( 'Email', 'themememe' ) . ( $req ? '*' : '' ) .'" value="' . esc_attr(	$commenter['comment_author_email'] ) .
    '" size="30"' . $aria_req . ' /></div>',
    Thread Starter saa67272

    (@saa67272)

    Thanks. I remove this code, but still have email field in comment form
    Please check my blog: https://kamilsamselski.pl

    Hi There

    It should be something in the comments.php in the range of

    <input type=”text” name=”url” id=”url” … or something similar; then delete or change it to hidden like this :

    <input type=”hidden” name=”url” id=”url” …

    .comment-form-email {
    display: none;
    }

    Add that to the bottom of your custom.css or style.css file.

    Thread Starter saa67272

    (@saa67272)

    Thanks for Help, I edit css and work ??

    Thread Starter saa67272

    (@saa67272)

    resolved

    thanks janet4now, you are the best

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Remove 'email' field from comments form’ is closed to new replies.