Title: detecting current category
Last modified: August 18, 2016

---

# detecting current category

 *  Resolved [alexgeek](https://wordpress.org/support/users/alexgeek/)
 * (@alexgeek)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/detecting-current-category-1/)
 * Is there a way to detect whether or not I’m on:
    [http://www.creativecoding.net/development/editions/2007/september/articles-september/](http://www.creativecoding.net/development/editions/2007/september/articles-september/)
   or [http://www.creativecoding.net/development/editions/2007/september/tutorials-september/](http://www.creativecoding.net/development/editions/2007/september/tutorials-september/)
 * Reason being, if I am on the articles category, I want to highlight it in the
   nav.
 * Hope that explains it!

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/detecting-current-category-1/#post-639976)
 * The Codex is your best friend…
    [http://codex.wordpress.org/Template_Tags/wp_list_categories#Markup_and_Styling_of_Category_Lists](http://codex.wordpress.org/Template_Tags/wp_list_categories#Markup_and_Styling_of_Category_Lists)
 *  Thread Starter [alexgeek](https://wordpress.org/support/users/alexgeek/)
 * (@alexgeek)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/detecting-current-category-1/#post-639995)
 * That won’t really work with what I’m doing.
    Is there a function that will tell
   you what category you are in?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/detecting-current-category-1/#post-639999)
 * Then you didn’t described correctly what you are trying to do.
    You said:
 * > _if I am on the articles category, I want to highlight it in the nav._
 * And the Codex says:
    _If the category list is generated on a Category Archive
   page, the list item for that category is marked with the HTML class current-cat.
   The other list items have no class._ Meaning you just have to define that class
   in your stylesheet in whichever way you want to “highlight” it.
 * If that’s not what you want – explain it.
 *  Thread Starter [alexgeek](https://wordpress.org/support/users/alexgeek/)
 * (@alexgeek)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/detecting-current-category-1/#post-640009)
 * My nav cannot be done with that function as it requires a custom code.
    Is there
   no answer to what I asked? :/
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/detecting-current-category-1/#post-640016)
 * I don’t know since I have no idea what your “custom code” i doing…
    Try the [Conditional_Tags](http://codex.wordpress.org/Conditional_Tags)?
 *  Thread Starter [alexgeek](https://wordpress.org/support/users/alexgeek/)
 * (@alexgeek)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/detecting-current-category-1/#post-640018)
 * Thanks!
    I think i ahve found what I need. WIll mark as solved,.
 *  [erick_paper](https://wordpress.org/support/users/erick_paper/)
 * (@erick_paper)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/detecting-current-category-1/#post-640194)
 * alexgeek, I am looking for exactly what you needed. Would you mind sharing how
   you resolved it? Thanks.

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

The topic ‘detecting current category’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [erick_paper](https://wordpress.org/support/users/erick_paper/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/detecting-current-category-1/#post-640194)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
