Loop Category on Wordpress

0

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.

    
asked by anonymous 04.10.2017 / 17:19

1 answer

0

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).

    
05.10.2017 / 20:34