[wp-trac] Re: [WordPress Trac] #2558: query_posts() should support
offset
WordPress Trac
wp-trac at lists.automattic.com
Tue Jun 13 10:43:46 GMT 2006
#2558: query_posts() should support offset
-------------------------+--------------------------------------------------
Id: 2558 | Status: assigned
Component: General | Modified: Tue Jun 13 10:43:46 2006
Severity: enhancement | Milestone: 2.1
Priority: normal | Version: 2.1
Owner: markjaquith | Reporter: markjaquith
-------------------------+--------------------------------------------------
Changes (by markjaquith):
* component: Administration => General
* severity: normal => enhancement
* keywords: => has-patch 2nd-opinion
* version: 2.0.1 => 2.1
* status: new => assigned
* owner: anonymous => markjaquith
Comment:
Try this patch out. It adds a new (private) query var: 'offset'
Offset moves the starting post by the specified number of posts.
e.g., 'offset=2' would start with third post (2 posts offset from the
first post). This is how it works in Movable Type.
You can use this to specify a range of posts that was not previously
possible.
e.g. 'offset=2&posts_per_page=10'
Previously, you would have had to query the first 12 posts and used PHP to
ignore the first two. This is much cleaner, more efficient, and easy for
people to understand.
--
Ticket URL: <http://trac.wordpress.org/ticket/2558>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list