Count the posts number for every category
-
22-10-2019 - |
Question
I'd like to count the number of posts created for every category, so:
12 Works (12 posts in works category)
36 Pictures (36 posts in pictures category)
17 Furnitures (17 posts in furnitures category)
How can I do that?
Solution
You can use wp_list_categories() function and set show_count to 1 (true) http://codex.wordpress.org/Template_Tags/wp_list_categories
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange