[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 20:27:46 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:                |
--------------------------+-----------------------
Description changed by scribu:

Old description:

> When I upgraded to 3.1 this query stopped working.
>
> '''Does NOT return any results in 3.1'''
>
> {{{
> query_posts( 'cat=8&tag=featured+hotels-and-motels' );
> }}}
>
> '''Returns expected results in 3.1!'''
>
> {{{
> $args = array (
>         'cat' => 8,
>         'tag_slug__and' => 'featured+hotels-and-motels',
> );
> query_posts( $args );
> }}}
>
> [http://wordpress.org/support/topic/query_posts-problem-with-multiple-
> tags-since-31-update Another user with similar experience].

New description:

 When I upgraded to 3.1 this query stopped working.

 '''Does NOT return any results in 3.1:'''

 {{{
 query_posts( 'cat=8&tag=featured+hotels-and-motels' );
 }}}

 '''Returns expected results in 3.1:'''

 {{{
 $args = array (
         'cat' => 8,
         'tag_slug__and' => 'featured+hotels-and-motels',
 );
 query_posts( $args );
 }}}

 [http://wordpress.org/support/topic/query_posts-problem-with-multiple-
 tags-since-31-update Another user with similar experience].

--

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


More information about the wp-trac mailing list