WordPress.org

Ready to get started?Download WordPress

Forums

Real category_count (3 posts)

  1. davidhosier
    Member
    Posted 8 years ago #

    I'm wondering if there's a way to display a category's real category_count, by including the category_count of its child (sub) categories? This request is somewhat similar to this support post, but that one only tells how to display a category's post count. In other words, I'd like to display

    Parent Category (10) >> Child Category (4)

    where the 4 posts in the child category are included in the 10 posts in the parent category (which in turn means that the parent category only really has 6 posts directly assigned to it).

  2. Jonathan Landrum
    Member
    Posted 8 years ago #

    When you write the post, it seems semantic to put it in the child category and the parent category, since it is really part of both. The end result would be what you are looking for, too.

  3. davidhosier
    Member
    Posted 8 years ago #

    True, but it's a little late now.

    Plus, I display categories by using a parent/child relationship, like Tech/Computers, Tech/Links. So it would be redundant to say Tech, Tech/Computers, Tech/Links.

Topic Closed

This topic has been closed to new replies.

About this Topic