From 7c7133aa9aa84f1dd815ec27576b8972d46db579 Mon Sep 17 00:00:00 2001 From: rboren Date: Tue, 23 Nov 2004 21:16:04 +0000 Subject: [PATCH] Give 404 precedence over other templates. git-svn-id: http://svn.automattic.com/wordpress/trunk@1877 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-blog-header.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-blog-header.php b/wp-blog-header.php index b82a8cac4f..840c6cfb15 100644 --- a/wp-blog-header.php +++ b/wp-blog-header.php @@ -210,6 +210,11 @@ if ($pagenow == 'index.php') { $wp_did_template_redirect = true; include(dirname(__FILE__) . '/wp-trackback.php'); exit; + } else if (is_404() && + file_exists("$wp_template_dir/404.php")) { + $wp_did_template_redirect = true; + include("$wp_template_dir/404.php"); + exit; } else if (is_home() && file_exists("$wp_template_dir/index.php")) { $wp_did_template_redirect = true; @@ -250,11 +255,6 @@ if ($pagenow == 'index.php') { $wp_did_template_redirect = true; include("$wp_template_dir/search.php"); exit; - } else if (is_404() && - file_exists("$wp_template_dir/404.php")) { - $wp_did_template_redirect = true; - include("$wp_template_dir/404.php"); - exit; } else if (file_exists("$wp_template_dir/index.php")) { $wp_did_template_redirect = true;