From c921aa8b0d3c8e181be154c7e00edfe8c5f0f153 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 17 Oct 2008 17:00:57 +0000 Subject: [PATCH] Better not found messages. Props caesarsgrunt. fixes #5324 git-svn-id: http://svn.automattic.com/wordpress/trunk@9226 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/default/archive.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/wp-content/themes/default/archive.php b/wp-content/themes/default/archive.php index f854465dd0..62eb72f01d 100644 --- a/wp-content/themes/default/archive.php +++ b/wp-content/themes/default/archive.php @@ -53,13 +53,20 @@ get_header();
+ + if (is_category()) // If this is a category archive + printf("

Sorry, but there aren't any posts in the %s category yet.

", single_cat_title('',false)); + else if (is_date()) // If this is a date archive + echo("

Sorry, but there aren't any posts with this date.

"); + else if (is_author()) // If this is a category archive + printf("

Sorry, but there aren't any posts by %s yet.

", get_userdatabylogin(get_query_var('author_name'))->display_name); + else + echo("

No posts found.

"); + include (TEMPLATEPATH . '/searchform.php'); -

Not Found

- - - + endif; +?>