Why this counting posts system doesn’t work ?
I’d like to list, in a fancy way and outside the loop, some categories and how many posts they include.
But, why this other code isn’t working for me ?
<?php $cat_posts = get_posts('category_name=BLAH'); echo '<h5 class="italic">There are ' . count($cat_posts) . ' Posts in <a href="http://url.com/blog/category/blah/">BLAH CATEGORY</a></h5>'; ?>
For some cats is working, for other it shows me less than there are.
- The topic ‘Why this counting posts system doesn’t work ?’ is closed to new replies.