Don't perform taxonomy queries for single post requests. Props scribu. fixes #16793 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
30462d25ca
commit
73799784cc
|
@ -2150,12 +2150,14 @@ class WP_Query {
|
||||||
$search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
|
$search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
|
||||||
|
|
||||||
// Taxonomies
|
// 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'];
|
$join .= $clauses['join'];
|
||||||
$where .= $clauses['where'];
|
$where .= $clauses['where'];
|
||||||
|
}
|
||||||
|
|
||||||
if ( $this->is_tax ) {
|
if ( $this->is_tax ) {
|
||||||
if ( empty($post_type) ) {
|
if ( empty($post_type) ) {
|
||||||
|
|
Loading…
Reference in New Issue