[wp-trac] [WordPress Trac] #9300: WP_Query with showposts and sticky posts
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 10 04:03:38 UTC 2009
#9300: WP_Query with showposts and sticky posts
--------------------------+-------------------------------------------------
Reporter: yukataninja | Owner: anonymous
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: General | Version:
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------+-------------------------------------------------
Changes (by apatheticresistance):
* status: closed => reopened
* version: 2.7 =>
* resolution: invalid =>
Comment:
I've never commented on the Wordpress Trac before, so forgive me if I'm
doing this wrong. But I don't think this issue should be closed. Disabling
stickies won't produce the intuitively desired result. From the original
example:
have 3 posts in order: Post 1, Post 2, Post 3 (<-- make sticky)
my_WPQuery = new WP_Query("showposts=2");
This will return 3 posts (Post 3, Post 1, Post 2).
But intuitively it should return 2 posts (Post 3, Post 1). I've tried
using the new "posts_per_page" and it seems to produce the same result.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9300#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list