<?php
$categories = get_categories();
foreach ($categories as $cat) {
if ($cat->category_parent != 0) {
echo ‘<span style=”padding-left:10px;”>’;
}
echo ‘category_nicename.’/”>’.$cat->cat_name.’ (‘.$cat->category_count.’)’;
if ($cat->category_description != ”) {
echo ‘ – ‘.$cat->category_description;
}
if ($cat->category_parent != 0) {
echo ‘</span>’;
}
echo ‘
‘;
}
?>