I would like to create a plugin that modify the styling of the comments section. Given that some users may be using other plugin to replace the default commenting system (facebook, disqus, ...), what are my options? Is the comments_template filter/template a good place to start? Basically, I intend to "surround" the existing comments output with HTML code.

Thanks for the help.

1 Answer 1


the comments_form function that outputs the contact form has two actions that could be used to accomplish what you want.

add_action( 'comment_form_before', 'wwm_comment_form_before' );

function wwm_comment_form_before() {
//output your opening html here

add_action( 'comment_form_after', 'wwm_comment_form_after' );

function wwm_comment_form_after() {
//output your closing html here

and that's a wrap :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.