get_categories() only returns categories in use
php, plugins, wordpress
Solution
<?php $args = array("hide_empty" => 0,
"type" => "post",
"orderby" => "name",
"order" => "ASC" );
$types = get_categories($args);
?>
Problem
``` $args = array( "type" => "post", "orderby" => "name", "order" => "ASC"); $types = get_categories($args); ``` When this is executed. $types only contains "Uncategorized" since it is used as the default to my posts. There are other categories available, but they are not returned unless I have a post that uses them. How can I return all possible categories and not just the ones that are in use?