Title: category_count problem
Last modified: August 22, 2016

---

# category_count problem

 *  [Fernando Funicelli](https://wordpress.org/support/users/fernaando/)
 * (@fernaando)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/category_count-problem/)
 * Hi friends,
    i’m having problems with this function on category.php
 * I’m trying to show the post count using this code:
 *     ```
       $cat = get_the_category(); $cat = $cat[0];
       echo $cat->category_count;
       ```
   
 * The problem is:
    When I access the category page like “category/category-name”
   the count is incorrect, but when i go to the page 2 or more like: “category/category-
   name/page/2” it’s right.
 * Some one had this issue and could help me please?
 * Thank you

Viewing 1 replies (of 1 total)

 *  Thread Starter [Fernando Funicelli](https://wordpress.org/support/users/fernaando/)
 * (@fernaando)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/category_count-problem/#post-5542941)
 * Anyone? I dont know where to start

Viewing 1 replies (of 1 total)

The topic ‘category_count problem’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [category count](https://wordpress.org/support/topic-tag/category-count/)
 * [category.php](https://wordpress.org/support/topic-tag/category-php/)
 * [taxonomy](https://wordpress.org/support/topic-tag/taxonomy/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 1 reply
 * 1 participant
 * Last reply from: [Fernando Funicelli](https://wordpress.org/support/users/fernaando/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/category_count-problem/#post-5542941)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
