We can use wp_list_categories,

wp_list_categories($args);

It will not show if category has not any post, because by deuault

'hide_empty'         => 1,

Than pass in argument

'hide_empty'         => 0,
Advertisements