You can use wp_list_categories
or get_categories
, just pass hide_empty = 0
to it. This will get you even those categories which do not have any posts associated with them.
Ex: $cats = get_categories(array('hide_empty' => 0));
You can use wp_list_categories
or get_categories
, just pass hide_empty = 0
to it. This will get you even those categories which do not have any posts associated with them.
Ex: $cats = get_categories(array('hide_empty' => 0));