Always show the widget title in a wordpress widget

That is not native behavior of it.

If you check the source of WP_Widget_Categories

$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base );

The title comes exclusively from the value saved in instance (or default if not). There is no logic to tie it in with current context.

Something is changing that behavior, some possibilities that come to mind:

  • you might have something override native widget
  • some code might be using widget_title, possibly incorrectly, to override
  • some JS code on front end might be changing title