Remove recent comments wp_head CSS

Adding this snippet to the functions.php of your wordpress theme will remove the CSS added to the header for the recent comments widget.

Code Snippet:

function remove_recent_comments_style() {
global $wp_widget_factory;
remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style'));
add_action('widgets_init', 'remove_recent_comments_style');

Comments  Leave a Reply

  1. Very useful, thanks!

  2. thx

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!