Titles Question - when using custom taxonomies and custom post types:
- on tag.php template file, we use the single_tag_title() function.
- on category.php template file, we use the single_cat_title() function.
- on taxonomy.php template file, we use the single_term_title() function.
- on archive-{posttype}.php template file, what function we need to use?
I believe the appropriate function is <?php post_type_archive_title(); ?>
But personally I pull in the whole post type object in case there's anything more than the title I need
$post_type = get_post_type();
$post_type_object = get_post_type_object($post_type);
echo $post_type_object->labels->name;
If you do a print_r($post_type_object) you can see all the data you get.
More info:
http://codex.wordpress.org/Function_Reference/post_type_archive_title
http://codex.wordpress.org/Function_Reference/get_post_type_object