I’ve got some code in my blog sidebar that is designed to show the number of posts in a particular category. It works, kind of. It will only show up to the number 5 and then it stops updating the post count. Any ideas on how to fix?
Here’s the code for one of the categories:
<?php
$count_posts = get_posts('post_type=post&category_name=Software')
?>
<li id="nav1">
<a class="<?php if ($current_cat == get_cat_ID('Software')) echo "software-active active"; ?>" href="<?php echo get_category_link(get_cat_ID('Software')) ?>" title="Software">Software (<?php echo count($count_posts) ?>)</a>
Here’s a link to the blog. thanks for your help!
Change:
To: