Does anyone know how I create a loop to display the categories and how many posts are there in each? Example:
Category-x (15)
Category-y (32)
Category-z (40)
Where "category" = category and category name the number is the number of posts in it.
Does anyone know how I create a loop to display the categories and how many posts are there in each? Example:
Category-x (15)
Category-y (32)
Category-z (40)
Where "category" = category and category name the number is the number of posts in it.
I found the answer in WordPress documentation . I just used the following function:
wp_list_categories('show_count = 1');
Where "1" is true indicating that it is to show the count. Default "0" (zero).