diff --git a/wp-includes/query.php b/wp-includes/query.php index f203c50a6d..ac542d5206 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1126,9 +1126,9 @@ class WP_Query { $whichcat .= " AND $wpdb->term_taxonomy.taxonomy = 'post_tag' "; $include_tags = "'" . implode("', '", $q['tag_slug__in']) . "'"; $whichcat .= " AND $wpdb->terms.slug IN ($include_tags) "; - $reqtag = is_term( $q['tag_slug__in'][0], 'post_tag' ); + $reqtag = get_term_by( 'slug', $q['tag_slug__in'][0], 'post_tag' ); if ( !empty($reqtag) ) - $q['tag_id'] = $reqtag['term_id']; + $q['tag_id'] = $reqtag->term_id; } if ( !empty($q['tag__not_in']) ) {