Look at the wp-content/themes/default/archive.php
file (lines 8 and 9) for an example of how it ‘detects’ the Category. It uses the is_category
conditional tag.
Other resources:
Conditional_Tags
Michael thanks for your help. To clarify, I’m aware of the is_category() function, but I don’t know how to get or display the category if a category archive page is being displayed. How do I do that?
Thanks!
Nevermind. I figured it out. single_cat_title()
The example at
http://codex.wordpress.org/Template_Tags/single_cat_title
implied that it returned the category title along with HTML linking to the category. I didn’t want the HTML, and now I found it doesn’t include it. Problem solved.
Yeah that single_cat_title is what the default theme uses. Thanks for the feedback and please consider marking this topic resolved.
Or please consider spelling out to us newbies exactly what you did.