How to edit comment form WordPress latest version 3.0 and above easily

5 min read
0
0
407

In this article am sharing how to edit comment form, modify comment form, delete comment form, add comment form and delete texts like required fields are marked *, Name, email and website in comment section.

Sometimes we like to edit comment form WordPress as our wish. We use comment form to get comment from visitors about the post. In the comment form, the fields “Your email address will not be published required fields are marked *”, Name, email and website are available default. You can change those  texts.

Read: 5 Best Free WordPress premium themes Download

If you search in WordPress support forum you will get something like you have to change the code in comment.php.

How to edit comment form WordPress

As per WordPress support forum, code to be changed like below

From php comment_form(); ?>   to

‘You do not have to leave an email address in order to reply.’)); ?>

But this won’t work in latest WordPress version i.e. above 3.3. Then what will work? If you change the comment template it will work. That mean by changing or modifying the comment template you can edit comment form in WordPress latest version.

How to modify your comment template in WordPress

  1. Login in to you Control Panel.
  2. Open wp-includes folder from File Manager.
  3. Select comment-template.php and Click Edit.
  4. Go to the line 1541 or search for ‘’ Near to this you can see “Your email address will not be published. Required fields are marked *”

    Edit comment form WordPress

  5. Change/Modify the text as your wish like aTechguide.com assured we won’t sell your email id.
  6. In Line 1527 you can see the array for comment fields.

edit comment form WordPress

<code>

$fields =  array(
'author' => '<p>' . '<label for="author">' . __( 'Name' ) . '</label> ' . ( $req ? '<span>*</span>' : '' ) .
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' />',


'email'  => '<p><label for="email">' . __( 'Email' ) . '</label> ' . ( $req ? '<span>*</span>' : '' ) .
'<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' />',

'url'    => '<p><label for="url">' . __( 'Website' ) . '</label>' .
'<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" />',
);</code>

Now you can change the field how you want. Example If you want to change Name to Your Name, you can change in comment template like this
<label for=”author”>’ . __( ‘Your Name’ )

Like this you can change Name *, Email *, Website and comment in your WordPress blog

See the output of the Code change

How to edit comment form WordPress
Load More Related Articles
Load More By Krishna Veni
Load More In Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also

10 Websites for Students to Earn Money Online

Online earning is one of the most popular trends these days to earn money. Basically, the …