I need to find a way to list all categories - empty or not - in a hierarchial list - like wp_list_categories - also showing the slug, cat name and a link to edit in the admin.
Here is what I have so far:
$args = array(
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => '0',
);
$categories = get_categories($args);
foreach( $categories as $category ) {
$cat_ID = $category->term_id;
$cat_name = $category->name;
#$cat_desc = $category->description; if ( !$cat_desc { $cat_desc = 'Nada!' } );
$cat_count = $category->count;
echo '<p><strong>'.$cat_name.'</strong>';
echo ' / <a href="' . get_category_link( $cat_ID ) . '" title="' . sprintf( __( "View all posts in %s" ), $cat_name ) . '" ' . '>View ( '. $cat_count . ' posts )</a> ';
#echo ' / Desc: '. $cat_desc . '';
echo ' / <a href="'. get_admin_url().'edit-tags.php?action=edit&taxonomy=category&tag_ID='.$cat_ID.'&post_type=post" title="Edit Category">Edit</a>';
echo '</p>';
}
All is good, but not nicely ordered - just an alphabetical list.