Home / comment / Remove recent comments wp_head CSS
  • How to 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.

    ( click code to copy )

    wordpress snippet : PHP

    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');

    ( WordPress codex functions, hooks, in this snippet. )

    init, wp_head, add_action, remove_action, wp,
  • Gökhan Ünal


  • Simon

    Very useful, thanks!