the number of posts in a category
-
say i have a category called “design” and i have 15 posts associated with “design”. how do i echo the number of posts with in that category. so in this case i want to echo “15”
i already have a loop with
<?php foreach((get_the_category()) as $cat) {?>and i can call the ids fine with
<?php echo $cat->cat_ID ?>but i cant retreave the amount of posts.
i’ve searched and searched :/
many thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘the number of posts in a category’ is closed to new replies.