WordPress.org

Ready to get started?Download WordPress

Forums

Display number of posts in a category (6 posts)

  1. rimshot
    Member
    Posted 9 years ago #

    Hello. Is there a way to display only the number of posts in a category? I have ID tags in my LI tags, and want to add the post count at the end. Thanks!

  2. rossz
    Member
    Posted 9 years ago #

    In index.php, find <?php wp_list_cats(); ?> and change it to <?php wp_list_cats("optioncount=1"); ?>. You might need to adjust the color, however.

  3. rimshot
    Member
    Posted 9 years ago #

    thanks, but is there a way to explicitly display just the number of posts of a specfic category?

    i pretty much just want:
    ( 42 )

    thanks

  4. Prim3r
    Member
    Posted 8 years ago #

    hi! :)

    My code is like this :

    <?php wp_list_cats('sort_column=name&hide_empty=0'); ?>

    how do i change this so it says the number of posts between ( )

    like - Personal ( 10 )

  5. TechGnome
    Moderator
    Posted 8 years ago #

    <snippy mode='on'>Prim3r, do you not read threads before replying? Go up three posts from this one, it's right there.</snippy>

    -tg

  6. hip
    Member
    Posted 8 years ago #

    Hi,

    If you want to get just the number of post as per-category you may use the following function at

    http://wordpress.org/support/topic/12805?replies=5#post-424730

    Have a good day,
    hip

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.