WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#8961 closed defect (bug) (invalid)

query_posts with future for archive results into wrong page turning

Reported by: treibstoff Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: Template Keywords: needs-patch
Focuses: Cc:

Description

Since wp 2.7 the monthly & yearly archiv shows the published & future posts if I'm using

<?php query_posts($query_string.'&post_status=publish,future'); if (have_posts()) : ?>

to start the loop inside the archive.php

It will show me all published & future post in the 2009 archiv - but if the side is pagged WP is unable to find the last page!!'''

Have a look at this side: http://lix.in/-3e79ed and choose the yearly archiv for 2009!

If the yearly archiv got only published post to see everything works fine while pagging.

It is allways the last page it doesn't find.

Right now I didn't find any ticket or solution for this problem.

Change History (5)

comment:1 @treibstoff6 years ago

  • Summary changed from query_posts with future for archive results into wrong pagging to query_posts with future for archive results into wrong page turning

comment:2 @treibstoff6 years ago

for any reason I wrote pagging instead of page turning (previeous / next)

comment:3 @Denis-de-Bernardy6 years ago

  • Keywords needs-patch added; query_posts future archive removed
  • Milestone changed from 2.8 to Future Release

comment:4 @Denis-de-Bernardy6 years ago

  • Component changed from General to Template

comment:5 @Denis-de-Bernardy6 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

you should be using your theme's functions.php for this, and override the WP for archive pages.

Note: See TracTickets for help on using tickets.