Don't do any taxonomy stuff if is_singular. See #15487
git-svn-id: https://develop.svn.wordpress.org/trunk@16515 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3484e62eca
commit
6401205f36
@ -1593,7 +1593,6 @@ class WP_Query {
|
||||
);
|
||||
}
|
||||
|
||||
if ( !$this->is_singular() ) {
|
||||
foreach ( $tax_query as $query ) {
|
||||
if ( 'IN' == $query['operator'] ) {
|
||||
switch ( $query['taxonomy'] ) {
|
||||
@ -1608,7 +1607,6 @@ class WP_Query {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $tax_query;
|
||||
}
|
||||
@ -1945,6 +1943,7 @@ class WP_Query {
|
||||
$search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
|
||||
|
||||
// Taxonomies
|
||||
if ( !$this->is_singular ) {
|
||||
$this->tax_query = $this->parse_tax_query( $q );
|
||||
if ( !empty( $this->tax_query ) ) {
|
||||
$clauses = call_user_func_array( 'get_tax_sql', array( $this->tax_query, $wpdb->posts, 'ID', &$this) );
|
||||
@ -1989,6 +1988,7 @@ class WP_Query {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !empty( $this->tax_query ) || !empty( $q['meta_key'] ) ) {
|
||||
$groupby = "{$wpdb->posts}.ID";
|
||||
|
Loading…
x
Reference in New Issue
Block a user