mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Don't show 404s for empty cats, fixes #1969
git-svn-id: http://svn.automattic.com/wordpress/trunk@3215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
43b2fc5f73
commit
2fdc11a1d2
@ -1620,7 +1620,7 @@ class WP {
|
||||
// issue a 404 if one was already issued, if the request was a search,
|
||||
// or if the request was a regular query string request rather than a
|
||||
// permalink request.
|
||||
if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {
|
||||
if ( (0 == count($wp_query->posts)) && !is_404() && !is_category() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) {
|
||||
$wp_query->set_404();
|
||||
status_header( 404 );
|
||||
} elseif( is_404() != true ) {
|
||||
|
Loading…
Reference in New Issue
Block a user