How To Customize Comment Submit Button In WordPress.

Hi,

We Use wordpress comments_template(); and get the default Comment form.

Sometimes we want to use our custom comment form and we can customize it in comments.php file. But we can not change the submit button’s html codes and can not easily add any class or id in the button and if we want to add html codes in fields like this 'label_submit'=>'Send'It does not work.

Now I’m sharing an easy way to customize Submit button codes.

Now just go to your functions.php file and add the code like this,

function comment_form_submit_button($button) {
$button =
'<button class="submit-btn" type="submit">Submit Comment<i class="icon-paper-plane"></i></button>' . //Add your html codes here
get_comment_id_fields();
return $button;
}
add_filter('comment_form_submit_button', 'comment_form_submit_button');

Thus customize your comment submit button as you want.

Have fun


Leave a Reply