tags:

views:

20

answers:

1

I'd imagen that it would look something like this:

<?php if (is_subcategory()): ?>
<h1><?php the_category(); ?></h1>
<?php else: ?>
<h1>something else</h1>
<?php endif ?>

Can someone tell me how this should actually be written?

A: 

Try this:

<?php if ( is_category() ) {
$child_cats = get_categories('child_of='.get_query_var('cat'));
}?>

http://codex.wordpress.org/Function_Reference/get_categories

songdogtech
so that's just to tell ask wordpress if it's in a subcat. But then how do I print that subcat name? is it still the_category();?
Brett