Title: Problem on getting category numbers
Last modified: August 19, 2016

---

# Problem on getting category numbers

 *  Resolved [stereosushi](https://wordpress.org/support/users/stereosushi/)
 * (@stereosushi)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/problem-on-getting-category-numbers/)
 * Hello,
 * I’m adding a menu to top of my page which includes some of my categories.
    The
   problem is, i have to add class=”selected on the category < li >
    -  when the category page is open. my permalinks are on and i cant get the category
      id with $_GET[‘cat’].
    - What are you opinions about this issue

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/problem-on-getting-category-numbers/#post-1005880)
 *     ```
       if ( is_category() ) {
       $cat = get_query_var('cat');
       }
       ```
   
 *  Thread Starter [stereosushi](https://wordpress.org/support/users/stereosushi/)
 * (@stereosushi)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/problem-on-getting-category-numbers/#post-1005896)
 * Thanks Michael

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

The topic ‘Problem on getting category numbers’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [stereosushi](https://wordpress.org/support/users/stereosushi/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/problem-on-getting-category-numbers/#post-1005896)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
