Title: getting category?
Last modified: August 18, 2016

---

# getting category?

 *  [pdstein](https://wordpress.org/support/users/pdstein/)
 * (@pdstein)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/getting-category/)
 * I’m modifying my header file to display description and keywords meta tags and
   I’m wondering when viewing a category page, how do I get that category?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/getting-category/#post-381229)
 * 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](http://codex.wordpress.org/Conditional_Tags)
 *  Thread Starter [pdstein](https://wordpress.org/support/users/pdstein/)
 * (@pdstein)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/getting-category/#post-381234)
 * 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!
 *  Thread Starter [pdstein](https://wordpress.org/support/users/pdstein/)
 * (@pdstein)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/getting-category/#post-381265)
 * Nevermind. I figured it out. single_cat_title()
 * The example at
    [http://codex.wordpress.org/Template_Tags/single_cat_title](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.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/getting-category/#post-381333)
 * Yeah that single_cat_title is what the default theme uses. Thanks for the feedback
   and please consider marking this topic resolved.
 *  [Bodhipaksa](https://wordpress.org/support/users/haecceity/)
 * (@haecceity)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/getting-category/#post-381343)
 * Or please consider spelling out to us newbies exactly what you did.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘getting category?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [Bodhipaksa](https://wordpress.org/support/users/haecceity/)
 * Last activity: [20 years, 1 month ago](https://wordpress.org/support/topic/getting-category/#post-381343)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
