function ribbon_list_cats( $parent_cat_slug, $echo = true )
{
$parent_category = get_category_by_slug( $parent_cat_slug );
if ( $parent_category->count > 0 )
{
$output="<ul>";
$output .= wp_list_categories('title_li=&child_of=".$parent_category->term_id."&hide_empty=0&show_option_none=&echo=0');
$output .= '</ul>';
}
// Debug: uncomment the following line
// echo '<pre>'; var_dump( $output ); echo '</pre>';
if ( $echo === false )
return $output;
return print $output;
}
// Call it like this:
ribbon_list_cats( 'uncategorized' );