Remove title from WordPress Calendar Widget

When you enter a blank title into WordPress Calendar Widget it still shows the before_widget and after_widget bits

This can cause your theme to look messy with an empty widget header.

The really easy fix is to just paste these few lines at the end of your functions.php file:

function calendar_widget_title( $title = '', $instance = '', $id_base = '' ) {
    if ( 'calendar' == $id_base && '&nb sp;' == $title )
        $title = '';
    return $title;
}
add_filter('widget_title', 'calendar_widget_title', 5, 3);

Leave a Reply

Your email address will not be published. Required fields are marked *