Custom Comment Form Fields

Customize the comment form fields.

<?php
function custom_comment_form_fields($fields) {
    $fields['comment'] = '<p class="comment-form-comment"><label for="comment">' . __('Your Comment') . '</label><textarea id="comment" name="comment" cols="45" rows="8" required="required"></textarea></p>';
    return $fields;
}
add_filter('comment_form_defaults', 'custom_comment_form_fields');

Post Comment