Category post count (1 post)

  1. Mithrustt
    Posted 8 years ago #

    In my post archives section, on the right side, I have it so it says how many posts are in that category. The problem is, no matter how many posts there are actually in the category, it says "This category contains 2 posts." The issue being that the categories obviously have more than 2 posts.

    This is the code I have, maybe someone can see where the issue is:

    <div class="archive_number">
    This category contains <?php $cat = get_the_category(); $cat = $cat[0]; echo $cat->category_count; ?> posts

Topic Closed

This topic has been closed to new replies.

About this Topic