summaryrefslogtreecommitdiffstats
path: root/wp-includes/query.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/query.php')
-rw-r--r--wp-includes/query.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/wp-includes/query.php b/wp-includes/query.php
index fad901a..61a78f6 100644
--- a/wp-includes/query.php
+++ b/wp-includes/query.php
@@ -998,7 +998,14 @@ class WP_Query {
}
} else {
$q['tag'] = sanitize_term_field('slug', $q['tag'], 0, 'post_tag', 'db');
- $q['tag_slug__in'][] = $q['tag'];
+ $reqtag = is_term( $q['tag'], 'post_tag' );
+ if ( !empty($reqtag) )
+ $reqtag = $reqtag['term_id'];
+ else
+ $reqtag = 0;
+
+ $q['tag_id'] = $reqtag;
+ $q['tag__in'][] = $reqtag;
}
}