WordPress Bug & its Fix : Categories shows incorrect number of posts


WordPress Version : 2.3.1

A bug is an issue with programmed code that causes unexpected or unwanted behaviour. Yesterday I fount a minor bug in WordPress while routine checkup of my blog. Even I have found a pretty simple way to fix it too.


If you have scheduled posts to appear on your blog, then it might happen that post count in the corresponding categories are not updated. Although the post will appear at the scheduled time and even the categories will show that they contain the post but the count shown is incorrect. And if that post is the very first post in that category, the category won’t even show up as categories with Zero posts don’t show up. This may lead to a false analysis at your end.


You can simply fix this issue by editing the post (which was earlier scheduled to appear) and then saving it without actually editing anything. Now check, it will reflect the corrected number of posts under the category now.