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

WordPress Trac noreply at wordpress.org
Wed Mar 5 17:49:14 UTC 2014


#27282: WP_Query returns more results when there are sticky posts
--------------------------+-----------------------------
 Reporter:  markoheijnen  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 When doing a WP_Query like the one below it can return more then 3 post
 depending if there are sticky posts and if there are returned.
 {{{
                 $query = new WP_Query( array(
                         'orderby'        => 'post__in',
                         'post__in'       => $post_ids,
                         'posts_per_page' => 3
                 ) );
 }}}

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


More information about the wp-trac mailing list