[wp-trac] [WordPress Trac] #27282: WP_Query returns more results when there are sticky posts

WordPress Trac noreply at wordpress.org
Thu Feb 12 19:57:03 UTC 2015


#27282: WP_Query returns more results when there are sticky posts
-------------------------------------------------+-------------------------
 Reporter:  markoheijnen                         |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Query                                |  Release
 Severity:  normal                               |     Version:
 Keywords:  stickies needs-unit-tests has-patch  |  Resolution:
                                                 |     Focuses:
-------------------------------------------------+-------------------------

Comment (by bendoh):

 I've also created a gist at
 https://gist.github.com/bendoh/bb3d62e5e0d470f00f9a that implements this
 fix in a way that doesn't affect core, instead using simple query filters.
 This can be dropped into any theme or plugin and will fix queries with
 stickies so that they page correctly and don't add to the post result
 count.

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


More information about the wp-trac mailing list