Md Mehedi Hasan

comment_form()

Order of the Comment Fields > Functions.php

function philosophy_comment_fields_custom_order( $fields ) {
    $comment_field = $fields['comment'];
    $author_field = $fields['author'];
    $email_field = $fields['email'];
    $url_field = $fields['url'];
    $cookies_field = $fields['cookies'];
    unset( $fields['comment'] );
    unset( $fields['author'] );
    unset( $fields['email'] );
    unset( $fields['url'] );
    unset( $fields['cookies'] );
    // the order of fields is the order below, change it as needed:
    $fields['author'] = $author_field;
    $fields['email'] = $email_field;
    $fields['url'] = $url_field;
    $fields['comment'] = $comment_field;
    $fields['cookies'] = $cookies_field;
    // done ordering, now return the fields:
    return $fields;
}
add_filter( 'comment_form_fields', 'philosophy_comment_fields_custom_order' );

Simple example how to change some comment form fields:

<?php
$philosophy_cMessage = "Your Message";

$comments_args = array(
    // Change the title of send button 
    'label_submit' => __( 'Submit', 'philosophy' ),
    // Change the title of the reply section
    'title_reply' => __( 'Write a Reply or Comment', 'philosophy' ),
    // Remove "Text or HTML to be displayed after the set of comment fields".
    'comment_notes_after' => '',
    // Redefine your own textarea (the comment body).
    'comment_field' => '<textarea name="cMessage" id="cMessage" class="full-width" placeholder="'.$philosophy_cMessage.'"></textarea>',
);
comment_form( $comments_args );

?>