[wp-trac] [WordPress Trac] #18897: query_posts / WP_query parameter 'offset' should play nicely with 'paged'

WordPress Trac noreply at wordpress.org
Tue Nov 26 20:35:07 UTC 2013


#18897: query_posts / WP_query parameter 'offset' should play nicely with 'paged'
------------------------------+-----------------------------
 Reporter:  here              |       Owner:  wonderboymusic
     Type:  enhancement       |      Status:  reopened
 Priority:  normal            |   Milestone:  3.8
Component:  Query             |     Version:  3.2.1
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+-----------------------------

Comment (by bradyvercher):

 The linked docs and code both had a comment about the behavior, so it's
 pretty well documented and has been consistent for 6 years. The Codex also
 has another article that details how to account for paged requests and how
 to fix pagination when using offset, which this patch doesn't consider,
 and is likely to break as well.

 For a quick example of code that would break, just try the snippet there:
 http://codex.wordpress.org/Making_Custom_Queries_using_Offset_and_Pagination

 Making this change also forces theme and plugin developers to implement
 functionality to account for both behaviors if they need to maintain
 backwards compatibility.

 I agree it would have been nice if this were available earlier, but at
 this point, it has potential to cause a lot of issues. A new arg,
 something like `paged_offset`, might be pretty cool, though.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/18897#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list