Hello,
I've been using the following code in a sidebar without any problems;
<?php if (is_front_page() || !is_single() || is_category()) :
$this_category = get_category($cat);
echo"<li><h3>Sub Categories</h3>";
echo"<ul>";
wp_list_categories('orderby=order&show_count=1&depth=1&title_li=&use_desc_for_title=1&child_of='.$this_category2->cat_ID);
echo"</ul></li>";
endif; ?>
Works perfectly thanks to the advice on the forums.
However if I move the code to a Widget which has PHP parsing enabled (have tried different plugins for this) everything works except get_category($cat) which does not return the current category ID, just null ?
Any ideas how to get this working in a widget ?