Ticker

6/recent/ticker-posts

Ad Code

Responsive Advertisement

How to move WordPress Comment Textfield after Name and Email field?

How to move WordPress Comment Textfield after Name and Email field

By default, WordPress comment form shows comment text area just above Name, Email and URL field.

In this tutorial, we will go over steps on how to switch Comment TextField and Name, Email postion.

Take a look at these custom tutorials on how to modify comment form before notes and modify comment form after notes.

In order to change comment form textfield position, just put below code into your WordPress theme’s functions.php file.

// Move Comment Textfield after Name and Email field
add_filter( 'comment_form_fields', 'move_comment_field' );
function move_comment_field( $fields ) {
    $comment_field = $fields['comment'];
    unset( $fields['comment'] );
    $fields['comment'] = $comment_field;
    return $fields;
}

Just clear your site cache and refresh page. You will see comment form as you see above.

Let me know if you face any issue running this code.

The post How to move WordPress Comment Textfield after Name and Email field? appeared first on Crunchify.

Enregistrer un commentaire

0 Commentaires