Use get_term_by() instead of is_term() to query slug. see #6593
git-svn-id: https://develop.svn.wordpress.org/trunk@8555 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1fba6c61c7
commit
ace1dbc33e
@ -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']) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user