Omid's Blog

WordPress, useless instructions removed

I have these instructions under all my comment forms in my wordpress theme:

You can use these HTML tags…

I looked for a way to remove those and here it is:

Just add this code in functions.php and the instructions go away.

Though it shouldn’t be the best option because it goes away with every theme upgrade!

 

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;
}
Posted July 10, 2014

Omid Hezaveh lives and works in Helsinki find him on twitter