I’m utilizing the get_categories() operate mixed with a foreach loop, to create an inventory of all of the catgorys in a kind. like so:
$args = array(
'sort' => 'publish',
'hide_empty' => 0, //<--IMPORTANT!!
'hierarchical' => 1,
'taxonomy' => 'class',
'pad_counts' => false );
$classes = get_categories($args);
foreach($classes as $class) {
echo '<tr>';
echo "<td>$category->title</td>";
echo "<td><enter sort='textual content' title='$category->cat_ID'/></td>";
echo '</tr>';
}
Nevertheless, what I want is for all of the sub classes to be indented, however I can not work out how.
After trying on the documentation Right here it appears that evidently $category->mum or dad parameter, could also be useful, however I can not get it working.
Any assist could be appreciated.