WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How many post under a category? (5 posts)

  1. akash3036
    Member
    Posted 5 months ago #

    Please help me anyone..
    How can I determine that How many post have a particular category?

  2. vtxyzzy
    Member
    Posted 4 months ago #

    If you go to Admin->Posts->Categories, the count is listed for each category.

  3. akash3036
    Member
    Posted 4 months ago #

    Thanks for replying.
    Actually I want to know when I will create or modify a theme, I want to show how many post under a particular category beside this category. So how can i write this code or modify. thanks.

  4. vtxyzzy
    Member
    Posted 4 months ago #

    It is still not clear what you want. If you just want to create a list of categories with counts, you can use the wp_list_categories() Template Tag.

    Here is some sample coding using that function:

    $args = array(
       'show_count' => 1,
       'hierarchical' => 1,
       'hide_empty' => 0
    );
    wp_list_categories($args);
  5. akash3036
    Member
    Posted 4 months ago #

    Wow! Its working. Thanks a lot for helping.

Reply

You must log in to post.

About this Topic