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?
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?
Try this:
<?php if ( is_category() ) {
$child_cats = get_categories('child_of='.get_query_var('cat'));
}?>
http://codex.wordpress.org/Function_Reference/get_categories