[wp-trac] [WordPress Trac] #26833: Using WP_Query with offset and menu_order

WordPress Trac noreply at wordpress.org
Fri Jan 17 06:30:24 UTC 2014


#26833: Using WP_Query with offset and menu_order
-----------------------------+------------------------------
 Reporter:  jacksouthernweb  |       Owner:
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Query            |     Version:  3.8
 Severity:  normal           |  Resolution:  wontfix
 Keywords:  needs-codex      |
-----------------------------+------------------------------
Changes (by bcworkz):

 * keywords:  reporter-feedback => needs-codex
 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Thank you for clarifying and the additional information. Using
 `'showposts' => -1` causes the `LIMIT` clause to be dropped entirely. The
 `LIMIT` clause of course is used to specify the offset. Think of the `-1`
 value as a show any posts parameter and not show an unlimited number of
 posts, implying some sort of count. The Codex does say this value shows
 any posts, I think it just needs to be clarified that 'any' means no
 offset can be applied.

 Since one normally uses offset for pagination, a limited quantity of posts
 to show is a natural partner, so I don't see not being able to use one
 without the other as a bug. This definitely needs to be made clearer in
 documentation.

 BTW, please use `posts_per_page` instead of the deprecated `showposts` for
 limiting posts returned.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26833#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list