WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How many post under a category?

[Resolved] How many post under a category?

Viewing 4 replies - 1 through 4 (of 4 total)
  • If you go to Admin->Posts->Categories, the count is listed for each category.

    akash3036
    Member

    @akash3036

    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.

    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);
    akash3036
    Member

    @akash3036

    Wow! Its working. Thanks a lot for helping.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] How many post under a category?’ is closed to new replies.