Better not found messages. Props caesarsgrunt. fixes #5324

git-svn-id: http://svn.automattic.com/wordpress/trunk@9226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-10-17 17:00:57 +00:00
parent b7959c1d28
commit c921aa8b0d
1 changed files with 12 additions and 5 deletions

View File

@ -53,13 +53,20 @@ get_header();
<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
</div>
<?php else :
<?php else : ?>
if (is_category()) // If this is a category archive
printf("<h2 class='center'>Sorry, but there aren't any posts in the %s category yet.</h2>", single_cat_title('',false));
else if (is_date()) // If this is a date archive
echo("<h2>Sorry, but there aren't any posts with this date.</h2>");
else if (is_author()) // If this is a category archive
printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", get_userdatabylogin(get_query_var('author_name'))->display_name);
else
echo("<h2 class='center'>No posts found.</h2>");
include (TEMPLATEPATH . '/searchform.php');
<h2 class="center">Not Found</h2>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
<?php endif; ?>
endif;
?>
</div>