Support » Fixing WordPress » Category shows incorrect post count

  • In the admin section of my wordpress, when I click on “Manage > Categories” it says that my “Misc” category has 12 posts, but it really doesn’t have any.

    What could be causing this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • We don’t know what is shown in your admin pages. On the frontend there is no “Misc” category.

    I had this problem. I created a new category and moved all the posts from old category to new one. And somehow the post count started working again. I’m sure there’s an alternative “real” solution though.



    Moshu, what do you mean you don’t know what’s in my admin section. I’ve just told you that an empty category is reporting that it has 12 posts in it. What more could I say?

    Saymawa, I would try your solution, but two things, there aren’t actually any posts in my “Misc” category to move, and also, “Misc” is my default category, so I can’t delete it. 🙁

    Change your Default Post Category in Options->Writing, delete the Category, recreate the Category, and reset the Default Post Category.

    Thats ugly. Wonder why the count is off–maybe static pages were counted against that category at one time??

    Michael, even after changing the default category to something different it won’t let me delete the category. It says:

    “Can’t delete the Misc category: this is the default one”

    Is there somewhere else I need to change it as well? Also, is there any way I can just change the post count to zero in the mysql database?

    melbell-I apologize, I thought at one time I used this trick on the default Category, Uncategorized in my case, but it must have been a different Category. I checked and I have a count of two showing for my default Category and I have no Uncategorized posts. Coincidentally, I have two Pages. To confirm this I added a new Page and my Uncategorized count increased by one.

    Pages (and posts) are kept in the wp_post table but Pages have a post_status of ‘static’. The table wp_post2cat contains the Category for each page/post but don’t know if changing that is the solution.

    Maybe change the description of your Misc Category to Pages or do nothing at all 😉

    Nice catch on the page count. I do, in fact, have 12 pages. Which is the number that my “Misc” category is showing as the post count.

    I wonder why it does that. Possibly because pages don’t have categories so it’s just saying that they are in the “default” category?


    Ah well, as long as I know that I’m not the only one showing this, it’s not just something that’s wrong with my WordPress installation, I can live with it.

    Thanks! 🙂

    I had this happen to me earlier today. I have a fairly new WP install, and it only has 1 custom category, which contains 3 posts.

    I also have 3 static pages. And for some reason the admin panel said that ‘uncategorized’ had 3 posts (when it should of had none).

    I logged into my cpanel to run phpMyAdmin to check out the database manually, and sure enough, in the table “wp_post2cat” which keeps track of which posts are in which categories. It was showing 3 posts in cat 1, which is ‘uncategorized’. Thoses posts were for my static pages. So for whatever reason my static pages showed up under ‘uncategorized’ in the sql, but the WP panel was not displaying them.. only the number.

    Anyway, the moral of this story is that if you can get into your database, you can easily manually delete these ‘incorrect’ entries 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Category shows incorrect post count’ is closed to new replies.