Don't 404 for empty custom taxonomy terms. See #12533
git-svn-id: https://develop.svn.wordpress.org/trunk@13615 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
735080c7fc
commit
d2232722ea
@ -2650,7 +2650,7 @@ class WP_Query {
|
||||
} elseif ( $this->is_tax ) {
|
||||
$tax = $this->get('taxonomy');
|
||||
$slug = $this->get('term');
|
||||
$term = &get_terms($tax, array( 'slug' => $slug ) );
|
||||
$term = &get_terms($tax, array( 'slug' => $slug, 'hide_empty' => false ) );
|
||||
if ( is_wp_error($term) || empty($term) )
|
||||
return NULL;
|
||||
$term = $term[0];
|
||||
|
Loading…
Reference in New Issue
Block a user