I am coding a pretty complex wordpress site (at least, taxonomically speaking), and i need to display a list of categories, children of a parent category, but I am struggling with getting the code to do this.
I tried doing something like:
<?php
$cat = get_query_var('cat');
$categories= get_categories('hide_empty=0&parent=1&child_of='.$cat);
foreach ($categories as $category) {
$mycat .= $category->cat_name;
echo $mycat;
}
?>
But i don't seem to get the correct output.
Do you have any idea? Thx!