What is the best approach for removing the "No categories" notice when no sub-categories are present?
Here is my code, which seems to work well, and links to populated sub-categories fine. Is something wrong here?
<div class="sub-cathead">
<ul>
<?php
$children = wp_list_categories('style=none&hierarchical=0&title_li=&child_of='.$cat.'&echo=0');
if ($children) { ?>
<?php echo $children; ?>
<?php } ?>
</ul>
</div>