WordPress: Display Category Post Count

If you have a custom category layout, you may want to display the number of posts in that category. This can simply be achieved by placing the following code into your template file (probably category.php)…

$customcats = get_categories();
$categorycount = $customcat->count;
echo $categorycount;
Free Graphics, Icons, Tutorials
Free Graphics Free Christmas Vector Icon Graphics Pack 2017Free Fitness Vector Icons Graphics PackFree Camping Vector Graphics PackFree Summer Graphics PackFree File Icon PackFree Fast Food Vector Graphics
Sharing is caring...
Like & Follow
Share the love, share this page! Facebook Twitter Digg Reddit LinkedIn Pinterest Email
Close [X]
The Web Taylor
1000 Lakeside North Harbour Portsmouth, Hampshire PO6 3EN
02392 123358