Make WordPress Core

Opened 10 years ago

Closed 8 years ago

#21207 closed defect (bug) (worksforme)

Link-template pagination link for page 1 missing query string args

Reported by: alexk45's profile alexk45 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: reporter-feedback
Focuses: template Cc:


In paginated pages, when on a page that is greater than page 1, the link for page 1 and the 'previousposts' link do not include any query arguments. This is fine if not including the first page argument, but not for other arguments in the query string.

For example pages that show results for form searches. The search criteria are stored with the GET method as query strings in the URL and need to be maintained from page to page as the user pages through their results.

This is in /wp-includes/link-template.php on line 1421.
A probable fix is the 'if' clause from if( $pagenum > 1 ) changed to if( $pagenum > 0 ).

I was wondering if you can apply this fix to future updates?


Change History (4)

#1 @johnbillion
10 years ago

  • Component changed from General to Template
  • Keywords reporter-feedback added

Unable to reproduce this on 3.4 or trunk with the previous_posts_link() function. Page 2 of a search results page ( shows the correct link to the first results page (

Can you reproduce the bug with the default theme and all your plugins deactivated?

#2 @SergeyBiryukov
10 years ago

Could not reproduce either.

#3 @nacin
9 years ago

  • Component changed from Template to General
  • Focuses template added

#4 @obenland
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed
  • Version 3.4 deleted

Can't reproduce it either.

Alexk45, please feel free to reopen the ticket with steps to reproduce the issue.

Note: See TracTickets for help on using tickets.