Category Loop in Wordpress

Asked

Viewed 49 times

0

Does anyone know how to create a loop to display categories and how many posts are in each one? Example:

Category X (15)
Category-y (32)
Category-z (40)

Where "category"=category name and
the number is the number of posts in it.

1 answer

0

I found the answer in wordpress documentation. Just use the following function:

wp_list_categories('show_count = 1');

Where "1" is true that indicates it is to show the count. Default "0" (zero).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.