Engagement is valuable in any platform, whether it’s through social media or your WordPress site.
The more comments that visitors leave on posts, the more likely it is that they will return to read and share your future updates and engage in discussions with you, and other visitors to your site. Eventually, if people like your site enough, a community may grow around it, nurtured by the people who frequently leave comments and start conversations about your posts.
Before all of this happens, however, you have to make sure that your content is good enough that visitors to your site will want to talk about it, and that your comment form is inviting and easy to use.
In order to make your comment form appealing, it would be useful to customize it instead of just using a basic layout. With enough tweaking, visitors to your site will be able to use their social media accounts to login and comment, turn on the option to receive alerts regarding the comment thread on a particular post, and much more.
In order to customize the WordPress comment form on your website, you will need to go to the Discussion Settings tab in the WordPress Admin Dashboard.
Go to Settings, then click Discussion.
In the Discussion Settings page you can change various settings, such as what commenters should fill out before being able to post, whether they should be logged in to comment, how many threads or nested comments are allowed, and whether the latest or oldest comments should be shown first.
You can also choose to place a button that allows commenters to receive updates regarding their posts (Follow comments), or to follow your blog.
Avatars can also be customized using the Discussion Settings menu.
You can choose whether to allow a commenter’s avatar to be shown, and what the default image should be if they do not have custom avatars. You can also specify what text to use to invite users to leave comments on the page. If you wish to further customize the comment form, you will need to edit the CSS code of your WordPress site.
In order to style the comments form, you need to either add your CSS code to your WordPress theme stylesheet, or modify the code of an existing theme’s comments.php template file.
You will need to modify the array of comment_form(), for example, and specify values.
To illustrate, the code for the Twenty Fourteen theme’s comment form is as follows:
To change the ID for the form, and the submit button, you can modify id_form. The ID for the button to submit a comment is determined by id_submit. The title at the top of the form when writing a comment is controlled by title_reply. Replies to a comment are controlled by title_reply_to. The text of the cancel reply link can be managed using cancel_reply link. label_submit controls the text in the submit button.
The text which appears before and after the comment form are specified by comment_notes_before and comment_notes_after. The login notification text can be specified by the parameters must_log_in for when a user who is not logged in comments, and logged_in_as when a commenter is already logged in. Fields can be styled by customizing their HTML. The URL, author, and e-mail fields can be modified using the parameter fields, while the comment field can be modified by comment_field as follows:
$args = array(
'comment_field' => ''
'fields' => apply_filters( 'comment_form_default_fields', array(
'author' =>
'' .
' ' .
( $req ? '*' : '' ) .
'
',
'email' =>
' ' .
( $req ? '*' : '' ) .
'
',
'url' =>
'' .
'
'
)
);
comment_form( $args );
I hope this post helps you customize your comments. If you run into any problems please post a comment below and I'll see if I can help you out.
3 thoughts on “How to Customize the WordPress Comment Form”
Thanks for the helpful information
comment
And what an insightful comment it is…