Group by not needed for not_in and and taxonomy queries. Props Otto42. fixes #7761
git-svn-id: https://develop.svn.wordpress.org/trunk@8968 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2fa7cd8715
commit
d9c4380549
|
@ -1789,7 +1789,7 @@ class WP_Query {
|
|||
$q['cat'] = implode(',', $req_cats);
|
||||
}
|
||||
|
||||
if ( !empty($q['category__in']) || !empty($q['category__not_in']) || !empty($q['category__and']) ) {
|
||||
if ( !empty($q['category__in']) ) {
|
||||
$groupby = "{$wpdb->posts}.ID";
|
||||
}
|
||||
|
||||
|
@ -1869,8 +1869,7 @@ class WP_Query {
|
|||
}
|
||||
}
|
||||
|
||||
if ( !empty($q['tag__in']) || !empty($q['tag__not_in']) || !empty($q['tag__and']) ||
|
||||
!empty($q['tag_slug__in']) || !empty($q['tag_slug__and']) ) {
|
||||
if ( !empty($q['tag__in']) || !empty($q['tag_slug__in']) ) {
|
||||
$groupby = "{$wpdb->posts}.ID";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue