Opened 18 years ago
Closed 18 years ago
#2738 closed defect (bug) (fixed)
Counting of post within a category dos not work correctly (unpublished posts are counted)
Reported by: | MacSEK | Owned by: | ryan |
---|---|---|---|
Milestone: | 2.1 | Priority: | normal |
Severity: | normal | Version: | 2.1 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
Within the Sidebar the categories are counting thier posts. If there are posts wich will be published in future, they are counted allready. You can see this bug on my weblog at http://www.dankefuernichts.com. The category video contains 4 posts. Two of them are allready Published. One will be released on monday next week, the fourth one one week later. Only two post are allready published. So the count should show 2, not 4.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
pad-counts.diff provides another method of counting categorized posts and links. This method pads parent category counts with the published posts/visible links of its children without counting any item twice. It is mainly useful for wp_list_categories as used in the default template, which is here fixed to eliminate the deprecated argument name.
The result of this type of counting is that when you click on a category archive link, the number next to that link represents the number of items in that archive. This has no effect on non-hierarchical category listings.
I tested this with future posting and all is well, both in the db and on the blog.