From 5318997d5f5e490f8287ed6e80acfc84738f93b6 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Thu, 18 Feb 2010 10:57:49 +0000 Subject: [PATCH] Display robots.txt even on blogs with 0 posts on the home page. See #12256 git-svn-id: https://develop.svn.wordpress.org/trunk@13194 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/classes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 958e4ba996..61b1179dad 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -473,7 +473,7 @@ class WP { function handle_404() { global $wp_query; - 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_robots() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) { // Don't 404 for these queries if they matched an object. if ( ( is_tag() || is_category() || is_author() ) && $wp_query->get_queried_object() ) { if ( !is_404() )