Support » Fixing WordPress » Incorrect category post count

  • I’m having an issue with the number of posts presumably assigned to a given category in WordPress 2.9.2. Under Categories, it’s showing (under the “Posts” column) that I have 28 posts assigned to “Uncategorized”. However, when I click “28” to show which posts are uncategorized it’s displaying none, which is as it should be (as I’ve categorized all of my posts).

    I’ve emptied my trash to ensure that there weren’t posts in there throwing off the count, no dice.

    Any thoughts? This isn’t a major issue as it does not appear to impact the usability of the site, however if it’s hinting at something wrong with my database I’d rather get it fixed stat.

    Thanks, any help is appreciated….. Paul

Viewing 2 replies - 1 through 2 (of 2 total)
  • Having the same issue here with 2.9.1. All posts are either deleted (permanently) or have tags. Maybe some were deleted uncategorized? Something with the new Trash?

    I am also having the same problem with wordpress 3.0.1.

    This is causing me a major headache as I have category quick links on my main page under the search box that shows the top 5 categories ordered by their post count and only one of these five categories has any posts.

    When I go into the category manager I can see against the categories in question that they are supposed to have 890,453,365,267 posts respectively but when I click on the counter link it just says there are no posts under this category.

    I can see from a cursory look at the WordPress database that the wp_posts table has been de-normalised and holds a category count column rather than actually counting the number of post categories in real time which all well and good if it worked.

    I don’t know how it got in this state but is there an inbuilt switch, button or update SQL statement that can be run to recalculate all category counts? Is there a plugin that will do this for me or do I have to write my own?

    Any help would be much appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Incorrect category post count’ is closed to new replies.