WordPress.org

Ready to get started?Download WordPress

Forums

How to show the number of posts? (6 posts)

  1. xaero
    Member
    Posted 8 years ago #

    Can it display the posts number of each categories?
    For example, in the sidebar.php, it displays the category list in this way:
    Categories

    • cat_A (26posts)
    • cat_B (216posts)
    • cat_C (126posts)
    • cat_D (206posts)

    The numbers in the brackets are total number of the category's posts.

    How can wordpress 1.5.1 do this?

  2. moshu
    Member
    Posted 8 years ago #

  3. xaero
    Member
    Posted 8 years ago #

    ha ~
    Thanks to moshu!
    I don't think it to be so easy:)

  4. webber
    Member
    Posted 8 years ago #

    ok.. what exactli i must change if my sidebar.php line 10 looks like: <?php wp_list_cats('list=0'); ?> ... ?

  5. Kafkaesqui

    Posted 8 years ago #

    http://codex.wordpress.org/Template_Tags/wp_list_cats

    <?php wp_list_cats('list=0&optioncount=1'); ?>

  6. webber
    Member
    Posted 8 years ago #

    Thak you Kafkaesqui!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.