-<?php get_header(); ?>
+<?php
+/**
+ * @package WordPress
+ * @subpackage Default_Theme
+ */
+
+get_header();
+?>
+
+ <div id="content" class="narrowcolumn" role="main">
- <div id="content" class="narrowcolumn">
-<?php is_tag(); ?>
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
</div>
<?php while (have_posts()) : the_post(); ?>
- <div class="post">
+ <div <?php post_class() ?>>
<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<small><?php the_time('l, F jS, Y') ?></small>
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
-
- <?php else : ?>
-
- <h2 class="center">Not Found</h2>
- <?php include (TEMPLATEPATH . '/searchform.php'); ?>
-
- <?php endif; ?>
+ <?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
+ $userdata = get_userdatabylogin(get_query_var('author_name'));
+ printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", $userdata->display_name);
+ } else {
+ echo("<h2 class='center'>No posts found.</h2>");
+ }
+ get_search_form();
+
+ endif;
+?>
</div>