Don't perform taxonomy queries for single post requests. Props scribu. fixes #16793 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@17504 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-03-08 22:01:19 +00:00
parent 4cb526a5b1
commit 13058d536e
1 changed files with 6 additions and 4 deletions

View File

@ -2150,12 +2150,14 @@ class WP_Query {
$search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
// Taxonomies
$this->parse_tax_query( $q );
if ( !$this->is_singular ) {
$this->parse_tax_query( $q );
$clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
$clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
$join .= $clauses['join'];
$where .= $clauses['where'];
$join .= $clauses['join'];
$where .= $clauses['where'];
}
if ( $this->is_tax ) {
if ( empty($post_type) ) {