[wp-trac] [WordPress Trac] #34660: Query breaks when nopaging = false and posts_per_page = -1
WordPress Trac
noreply at wordpress.org
Wed Nov 11 20:58:56 UTC 2015
#34660: Query breaks when nopaging = false and posts_per_page = -1
-------------------------------------------------+-------------------------
Reporter: mgibbs189 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future
Component: Query | Release
Severity: normal | Version: trunk
Keywords: has-patch needs-docs needs-unit- | Resolution:
tests | Focuses:
-------------------------------------------------+-------------------------
Comment (by mgibbs189):
@boonebgorges Regarding the other scenario:
When `nopaging = true`, an elegant solution could be to override
`posts_per_page`, similar to how `showposts` currently does it. E.g.
{{{#!php
if ( isset($q['nopaging']) && $q['nopaging'] ) {
$q['posts_per_page'] = -1;
}
}}}
IMO, I'd love to see `nopaging` disappear (like with `showposts`), but
that's for another day :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34660#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list