From 103bde3e19cb8491346761735766e585daef6026 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Fri, 19 Nov 2010 19:25:53 +0000 Subject: [PATCH] Do not set is_category/is_tax/is_tax for is_singular requests. props mtekk. fixes #15487 git-svn-id: https://develop.svn.wordpress.org/trunk@16495 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 205cd5f19d..8cc83a0ab6 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1591,17 +1591,19 @@ class WP_Query { ); } - foreach ( $tax_query as $query ) { - if ( 'IN' == $query['operator'] ) { - switch ( $query['taxonomy'] ) { - case 'category': - $this->is_category = true; - break; - case 'post_tag': - $this->is_tag = true; - break; - default: - $this->is_tax = true; + if ( !$this->is_singular() ) { + foreach ( $tax_query as $query ) { + if ( 'IN' == $query['operator'] ) { + switch ( $query['taxonomy'] ) { + case 'category': + $this->is_category = true; + break; + case 'post_tag': + $this->is_tag = true; + break; + default: + $this->is_tax = true; + } } } }