in

Change Options Field in WordPress Comment Form

WordPress is now popular software for website developer and owner if you want run a simple blog or business website then WordPress is Popular and free tool that provides you online anytime without having too much knowledge of website development it comes many customs features with various business tools to make site attractive and get responses from users.

Now we talk about editing comments form in WordPress previously we told you to adding an extra to your WordPress theme. Question is why you need to remove or edit or Change Options Field in WordPress Comment Form there may be many reason like if you want to remove URL field then to prevent span or any design or looking issue whatever your needs.Also try some free premium design WordPress themes

Note: Before doing any editing you should take backup first

How to Change Leave a Reply to Leave Comment:

Wanted to know how to change default “leave a reply” title in Comment form to your own and attractive you don’t need to highly complex code just to do simple steps this happens with WordPress theme in comments.php also read WordPress default Function Reference/comment form

Change text in comment form

Step 1: First login to your website control panel (Before doing any thing you must take backup first to prevent any accident with website) now open you theme directory then comments.php with text editor.

Step 2:Search below code in comments.php:

<?php comment_form(); ?>

if you don’t find same code then you directly search for text that you want to change and replace with this

<?php comment_form( array( 'title_reply' => 'Leave a Comment', 'label_submit' => 'post comment' ) ); ?>

Step 3:Save you file if you Edited file locally then re-upload again on server and enjoy

Remove URL field in Comment Form:

If you want to prevent user to leave their website in comment then you can just remove that field from Comment form.

In your theme directory open function.php with text editor and paste below code into file:

function remove_comment_fields($fields) {
unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields','remove_comment_fields');

you will get url option again after removing code from your theme function file.

wordpress comment form
WordPress comment form with fields

CSS Codes for WordPress Comments Form:

#commentform #author -Used for author name field

#commentform #email – Used for author email address field

#commentform #url – Used for author url field

To add CSS open style.css of your theme and paste below code with your own editings

#commentform #author {

width: 400px;
margin-left: 36px;
}

Like to Change Submit button like wrock metro theme then use below CSS code

#commentform #submit {
background: #359BED;
cursor: pointer;
font-weight: bold;
font-size: 14px;
border: none;
color: #FFF;
padding: 12px 16px;
color: #FFF;
margin: 20px;
}

Hope you get that much info you want if need more help regarding to comment form then post comment below.

6 Comments

Leave a Reply

Leave a Reply

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

Magazine Style WordPress Theme

Set Thumbnail Image in Blog Post WordPress Tutorial