arielgk
6/18/2015 - 4:37 AM

wordpress get categories of custom post

wordpress get categories of custom post

$customPostTaxonomies = get_object_taxonomies('products');

if(count($customPostTaxonomies) > 0)
{
     foreach($customPostTaxonomies as $tax)
     {
	     $args = array(
         	  'orderby' => 'name',
	          'show_count' => 0,
        	  'pad_counts' => 0,
	          'hierarchical' => 1,
        	  'taxonomy' => $tax,
        	  'title_li' => ''
        	);

	     wp_list_categories( $args );
     }
}