WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] count articles in categories (3 posts)

  1. x_maras
    Member
    Posted 4 years ago #

    I've seen in a lot of blogs next to the category name, a number which means the amount of the articles in this category.

    Is there a function that returns this? If there is not, can you please
    tell me where I have to look in the database in order to make one?

    Thanks,
    Dinos

  2. Oleg Butuzov
    Member
    Posted 4 years ago #

    category-template.php

    -> get_the_category( $id = false )
    -> and some other, also posible to parse wp_cache_object

    functions that do things you describe below
    -> wp_list_categories

  3. x_maras
    Member
    Posted 4 years ago #

    Thanks,

    I found it in the wp_list_categories as you said.
    Just added the parameter show_count=1.

    Thanks again, for the help

Topic Closed

This topic has been closed to new replies.

About this Topic