I know topic is a bit old, but just needed this and if it can help someone.
Code from very popular plugin using exclamation mark “!” in widgets titles to hide them. Adapted to work without “!”.
// Add the filter and function, returning the widget title only if not empty
add_filter( 'widget_title', 'remove_widget_title' );
function remove_widget_title( $widget_title ) {
if ( substr ( $widget_title, 0, 1 ) == 0 )
return;
else
return ( $widget_title );
}
If you find problems with third party widgets use “!”, works all the time:
// Add the filter and function, returning the widget title only if the first character is not "!"
add_filter( 'widget_title', 'remove_widget_title' );
function remove_widget_title( $widget_title ) {
if ( substr ( $widget_title, 0, 1 ) == '!' )
return;
else
return ( $widget_title );
}