Remove “You may use these HTML tags and attributes…” from WordPress

Below the comments box in WordPress (on this site and on most others) is a bit of guidance which says something along the lines of :

“You may use these HTML tags and attributes: 
<a href="" title=""> <abbr title=""> <acronym title=""> 
<b> <blockquote cite=""> <cite> <code> <del datetime=""> 
<em> <i> <q cite=""> <strike> <strong>”

How To Remove HTML Tag Hints


You may not like having them – so if you want to remove them, there’s a quick and easy way to do so. Simple find your theme’s functions.php file (which will be in the folder public_html/wp-content/themes/yourtheme/) and add the following to it, at the bottom, before the closing php (?>) tag :

function mytheme_init() {
	add_filter('comment_form_defaults','mytheme_comments_form_defaults');
}
add_action('after_setup_theme','mytheme_init');

function mytheme_comments_form_defaults($default) {
	unset($default['comment_notes_after']);
	return $default;
}

Save a backup copy of the original functions.php just in case, then upload the new one and voila – should be gone.

Want to talk to us about your project?