[wp-trac] [WordPress Trac] #31692: WP_Query post__in parameter to accept another WP_Query objcet
WordPress Trac
noreply at wordpress.org
Fri Sep 4 02:35:07 UTC 2015
#31692: WP_Query post__in parameter to accept another WP_Query objcet
-------------------------+-------------------------
Reporter: maksbd19 | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Query | Version: 4.2
Severity: normal | Resolution: maybelater
Keywords: | Focuses:
-------------------------+-------------------------
Changes (by boonebgorges):
* status: new => closed
* resolution: => maybelater
* milestone: Awaiting Review =>
Comment:
maksbd19 - Thanks for the suggestion!
I agree that `WP_Query` has some limitations in the way that queries can
be structured. In particular, query vars passed to `WP_Query` are always
interpreted with `AND`, so that `post__in=1,2,3&post_author=5` will only
find posts that match *both* clauses.
In the future, it would be nice to modify `WP_Query` so that it supports
something akin to the complex, nestable syntax of `WP_Tax_Query` and
`WP_Meta_Query`. This will be more extensive than simply modifying the way
that 'post__in' works. But it will also involve major reworking of
`WP_Query`, so is some way off.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31692#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list