(Moderator’s note: post was originally entitled “Taxonomy.php title”)
How can I display the “Posts classified under:” title for the taxonomy.php
page? For example, this code is used in tag.php
:
printf( __( 'Tag Archives: %s', 'twentyten' ),
'<span>' . single_tag_title( '', false ) . '</span>' );
1 Answer
Use:
$tax = $wp_query->get_queried_object();
printf( __( 'Posts classified under: %s', 'textdomain' ), '<span>' . $tax->name . '</span>' );