I am trying to retrieve categories from the category taxonomy of the custom post type
By the below codes :
$categories = get_categories(array(
'type' => 'ad_listing',
'child_of' => 0,
'parent' => '',
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => 1,
'hierarchical'=> 1,
'exclude' => '',
'include' => '',
'number' => '',
'taxonomy' => 'ad_cat',
'pad_counts' => false
));
echo"<pre>";
print_r($categories);
echo"</pre>";
But it is not showing nothing in category though there are 3 categories. i think i am doing something wrong :(
hide_emptyisn't showing categories without posts attached to them. - Ohgodwhy