views:

302

answers:

1

I'm trying to output the title of a taxonomy page when viewing it...

So like, if i was on a 'tag' page i would go:

<?php if (is_tag()) {?>
    <h1><?php single_cat_title(); ?></h1>
<?php } ?>

But how would i achieve the same thing for if the user is viewing a specific taxonomy page?

is_taxonomy() doesn't exist so i'm suck! :/

+1  A: 

Found this answer for anyone else wondering.

Follow this guide: http://justintadlock.com/archives/2009/06/04/using-custom-taxonomies-to-create-a-movie-database

Right down the bottom, the line wanted was:

<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->name; ?>
Blackbird
Ah ha, gotcha. Yea, this is in WordPress 3.0, which I haven't messed with yet. Glad you found your answer!
hsatterwhite