Ticket #1969: is_category.diff
| File is_category.diff, 1.0 KB (added by chuyskywalker, 6 years ago) |
|---|
-
wp-includes/classes.php
82 82 83 83 if ('404' == $qv['error']) { 84 84 $this->is_404 = true; 85 if ( !empty($query) ) { 85 if ( !empty($query) ) { 86 86 do_action('parse_query', array(&$this)); 87 87 } 88 88 return; … … 1612 1612 // issue a 404 if one was already issued, if the request was a search, 1613 1613 // or if the request was a regular query string request rather than a 1614 1614 // permalink request. 1615 if ( (0 == count($wp_query->posts)) && !is_404() && !is_ search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {1615 if ( (0 == count($wp_query->posts)) && !is_404() && !is_category() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) { 1616 1616 $wp_query->set_404(); 1617 1617 status_header( 404 ); 1618 1618 } elseif( is_404() != true ) {
