Im using a custom filter to change the fields, but can´t figure out how to change the order of the fields in the comment form.
Desired order:
- comment field (first/top)
- name
- website
This is the code which I am currently using:
function alter_comment_form_fields($fields){
$fields['comments'] = 'Test';
$fields['author'] = '<p class="comment-form-author">' . '<label for="author">' . __( 'Your name, please' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
'<input id="author" name="author" type="text" placeholder="John Smith" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>';
$fields['email'] = 'next'; //removes email field
//$fields['url'] = ''; //removes website field
return $fields;
}
add_filter('comment_form_default_fields','alter_comment_form_fields');