Remove HTML Tags and Attributes in WordPress Comments

Bu default WordPress comments have instructions for users on how to use HTML tags and attributes in the actual comments, many users are turned off by this, here is how to remove HTML Tags and Attributes section in the post comments form in WordPress theme.

wordpress-html-comments

By default this format appears in a few themes including Twenty Twelve, you need to change a php snippet of code in the comments.php file, if you are using a child theme just create a new comments.php file in the child theme directory with the content from the parent, then search and replace on line 58(ish – of TwentyTwelve).

From

<?php comment_form(); ?>

 

to:

<?php comment_form(array('comment_notes_after' => '')); ?>

 

Now all the HTML tags are gone.

Leave a Comment





%d bloggers like this: