[wp-trac] [WordPress Trac] #30846: Custom query using tag__in sets query_var tag_id
WordPress Trac
noreply at wordpress.org
Sat Dec 27 04:34:06 UTC 2014
#30846: Custom query using tag__in sets query_var tag_id
-------------------------------+------------------------------
Reporter: philbirnie | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.1
Severity: normal | Resolution: invalid
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by philbirnie):
* status: new => closed
* resolution: => invalid
Comment:
Thanks for the unit test - I'll use that in the future. I figured it out.
I was attempting to run $query->get_posts() after instantiating the query.
This was what was causing the extra 'AND' in the MySQL query mentioned in
my previous remarks.
I assumed that $query->get_posts would ''not'' modify the query when run
after instantiation, but that doesn't seem to be the case.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30846#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list