Opened 13 years ago
Closed 11 years ago
#21207 closed defect (bug) (worksforme)
Link-template pagination link for page 1 missing query string args
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | reporter-feedback |
Focuses: | template | Cc: |
Description
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?
Thanks
Change History (4)
Note: See
TracTickets for help on using
tickets.
Unable to reproduce this on 3.4 or trunk with the
previous_posts_link()
function. Page 2 of a search results page (example.com/page/2/?s=test
) shows the correct link to the first results page (example.com/?s=test
).Can you reproduce the bug with the default theme and all your plugins deactivated?