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

WordPress Trac noreply at wordpress.org
Sat Sep 13 07:28:45 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:  Query              |     Version:  4.0
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by stratboy):

 Replying to [comment:1 collinsinternet]:
 > Hi stratboy,
 >
 > I'm unable to reproduce this issue.  Are there more arguments in your
 query_vars that you are using?

 Mmm, no, that's exactly the query I was using. It was used on a taxonomy
 template page (meaning taxonomy-tax_name.php). I ended up setting a value
 of 999. It worked just fine.
 Note that using string $args instead, -1 is correctly interpreted. Note
 also that I also tested the array $args with only the 'posts_per_page'
 query, without the orderby (which features the new v4 syntax) and it
 didn't work, so I guess the problem is exactly the -1 value when passed as
 an array.

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


More information about the wp-trac mailing list