<?php if ( is_tax(APP_TAX_CAT) ) {
// go get the taxonomy category id so we can filter with it
// have to use slug instead of name otherwise it'll break with multi-word cats
if ( !isset( $filter ) )
$filter = '';
$ad_cat_array = get_term_by( 'slug', get_query_var(APP_TAX_CAT), APP_TAX_CAT, ARRAY_A, $filter );
// build the advanced sidebar search
// show all subcategories if any
$subcats = wp_list_categories
('hide_empty=0&orderby=name&show_count=1&title_li= &use_desc_for_title=1&echo=0&show_option_none=0&ta xonomy='.APP_TAX_CAT.'&depth=1&child_of
=' . $ad_cat_array['term_id']);
if ( !empty($subcats) ) :
?>
<div class="shadowblock_out">
<div class="shadowblock">
<h2 class="dotted"><?php _e('Sub Categories', 'appthemes') ?></h2>
<ul>
<?php print_r($subcats); ?>
</ul>
<div class="clr"></div>
</div><!-- /shadowblock -->
</div><!-- /shadowblock_out -->
<?php endif; ?>
<?php } // is_tax ?>