Ticket #3110 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

wp_get_archives not working properly on daily view

Reported by: RuddO Assigned to: westi
Priority: normal Milestone: 2.1
Component: Template Version: 2.0.4
Severity: normal Keywords: wp_get_archives bg|has-patch
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

3110.diff (3.9 kB) - added by westi on 09/06/06 19:44:36.
Fix wp_get_archives show_post_count

Change History

09/06/06 06:48:22 changed by westi

  • keywords set to wp_get_archives.
  • owner changed from anonymous to westi.
  • version set to 2.0.4.
  • status changed from new to assigned.
  • milestone set to 2.1.

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.

09/06/06 19:44:36 changed by westi

  • attachment 3110.diff added.

Fix wp_get_archives show_post_count

09/06/06 19:45:49 changed by westi

  • keywords changed from wp_get_archives to wp_get_archives bg|has-patch.

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.

09/07/06 17:38:44 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

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