i edit my last reply. check out the original category widget of wordpress itself. this works. maybe just take it from them to count the postcount ??
for your question: answer is 2 or 1. it depends on the posts. If there are 2 posts and 1 post is category 1 and the other post is category 2, then the answer is 2.
But if there is only 1 post and this post have 2 categories (categroy 1 & categroy 2), the answer is 1.
If the parent category itself have posts as well, the answer is same as above + (???) how many posts are in this category as well ??
i guess there is the problem. You count the posts per category. that is correct. but it would be better if you count the posts + the posts in subcategories of that category as well, because that is a game-changer and clearly worth a lot, as it allowes to shrink the menu down from 170 categories to only 10 parent categories and the user can still see how many posts he will see on his way through the toggles of subcategories.
-
This reply was modified 2 years, 4 months ago by wom87.
-
This reply was modified 2 years, 4 months ago by wom87.
-
This reply was modified 2 years, 4 months ago by wom87.