[wp-trac] [WordPress Trac] #16730: query_posts() problem with multiple tags since 3.1 update

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 2 21:57:29 UTC 2011


#16730: query_posts() problem with multiple tags since 3.1 update
--------------------------+-----------------------
 Reporter:  joshstauffer  |       Owner:  scribu
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  3.1.1
Component:  General       |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+-----------------------

Comment (by scribu):

 Re doubling:

 The trouble is that after each call to parse_query(), 'tag_slug__and' and
 'tag_slug__in' are populated again, without being reset.

 Two ways of going about this:

 * Reset them using $wp_query->query. This is the easiest way, but is a
 potential source of future bugs.

 * Don't manipulate them at all; parse 'cat' and 'tag' directly into
 tax_query.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16730#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list