I am building a custom WordPress theme and I'm trying to tweak the comments form. If you go to my blog page and scroll down to the comments section (bottom of each entry) you'll notice that the comments section has two textarea
fields. I don't want the first one, but I'm not sure why or how it's getting inserted in there. I'd like the order of the form to just be: name, email, comment. The code for the extra text area is not in the code I've written for the custom comment form in functions.php:
function alpha_comments_defaults($defaults){
$defaults['id_form'] = '';
$defaults['id_submit'] = '';
return $defaults;
}
function alpha_comments_fields(){
$commenter= wp_get_current_commenter();
$req = get_option('require_name_email');
$aria_req = ($req ? " aria-required='true'" : ' ');
$fields = array(
'author' =>
'<p class="comment-form-author"><label>' . __( 'Name', 'domainreference' ) . ( $req ? '<span class="required">*</span>' : '' ) . '</label> ' .
'<input name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" ' . $aria_req . ' /></p>',
'email' =>
'<p class="comment-form-email"><label>' . __( 'Email', 'domainreference' ) . ( $req ? '<span class="required">*</span>' : '' ) . '</label> ' .
'<input name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" ' . $aria_req . ' /></p>',
'url' =>
'',
'comment_field' =>
'<p class="comment-form-comment"><label>' . _x( 'Comment', 'noun' ) . '</label>' .
'<textarea name="comment" cols="45" rows="8" ' . $aria_req . '></textarea></p>'
);
return $fields;
}
add_filter('comment_form_defaults', 'alpha_comments_defaults');
add_filter('comment_form_default_fields', 'alpha_comments_fields');
How do I get rid of the extra form field?