[wp-trac] [WordPress Trac] #29644: query_posts doesn't suppot -1 value for posts_per_page if argument is an array

WordPress Trac noreply at wordpress.org
Fri Sep 12 16:02:22 UTC 2014


#29644: query_posts doesn't suppot -1 value for posts_per_page if argument is an
array
--------------------------+-----------------------------
 Reporter:  stratboy      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.0
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Using a syntax like this:


 {{{
         $args = array_merge($wp_query->query_vars, array(
                 'posts_per_page' => -1,
                 'orderby' => array('menu_order' => 'ASC', 'date' =>
 'DESC')
         ));

         query_posts($args);
 }}}

 I don't get any record. I found it's for the -1 value. If I use any
 positive integer it returns the right posts in the right order.

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


More information about the wp-trac mailing list