Make WordPress Core

Opened 18 years ago

Closed 18 years ago

#3110 closed defect (bug) (fixed)

wp_get_archives not working properly on daily view

Reported by: ruddo's profile RuddO Owned by: westi's profile westi
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0.4
Component: Template Keywords: wp_get_archives bg|has-patch
Focuses: Cc:

Description

<?php wp_get_archives('type=monthly&show_post_count=1'); ?>

works and shows the post counts

<?php wp_get_archives('type=daily&show_post_count=1&limit=10'); ?>

doesn't show post counts (though the listing works)

what's wrong?

example:

http://digitalcameratracker.com/archives/

Attachments (1)

3110.diff (3.9 KB) - added by westi 18 years ago.
Fix wp_get_archives show_post_count

Download all attachments as: .zip

Change History (4)

#1 @westi
18 years ago

  • Keywords wp_get_archives added
  • Milestone set to 2.1
  • Owner changed from anonymous to westi
  • Status changed from new to assigned
  • Version set to 2.0.4

wp_get_archives only seems to use this parameter for monthly archives (and the new yearly archives in 2.1.

I'll take this and put together a patch later today.

@westi
18 years ago

Fix wp_get_archives show_post_count

#2 @westi
18 years ago

  • Keywords bg|has-patch added

Attached patch fixes wp_get_archives to show_post_count correctly for all archive types except postbypost for which is seems pointless (it will always be 1)

I also tidyed up the code a bit and removed some unecessary duplication.

#3 @ryan
18 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4172]) Honor show_post_count. Props westi. fixes #3110

Note: See TracTickets for help on using tickets.