Make WordPress Core

Changeset 17504


Ignore:
Timestamp:
03/08/2011 10:01:19 PM (14 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r17500 r17504  
    21512151
    21522152        // Taxonomies
    2153         $this->parse_tax_query( $q );
    2154 
    2155         $clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
    2156 
    2157         $join .= $clauses['join'];
    2158         $where .= $clauses['where'];
     2153        if ( !$this->is_singular ) {
     2154            $this->parse_tax_query( $q );
     2155
     2156            $clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
     2157
     2158            $join .= $clauses['join'];
     2159            $where .= $clauses['where'];
     2160        }
    21592161
    21602162        if ( $this->is_tax ) {
Note: See TracChangeset for help on using the changeset viewer.