I'm having an issue with a theme I am creating from scratch. I'm trying to setup the page for viewing the archives/categories, but for some reason whenever I click on a date or category the date or category is displayed over and over again instead of the post title. So if I click on October 2011, October 2011 is displayed as the title for each of the posts that were posted in October 2011, and the actually post title is nowhere to be seen. An excerpt from the post is shown however. Here's the code that I have for archive.php.
<?php get_header(); ?>
<div id="content">
<h2 class="pagetitle">
<?php if (is_category()) { ?>
Archive for the '<?php single_cat_title(); ?>' Category
<?php } elseif( is_tag() ) { ?>
Posts Tagged '<?php single_tag_title(); ?>'
<?php } elseif (is_month()) { ?>
Archive for <?php the_time('F, Y'); ?>
<?php } ?>
</h2
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID()); ?>" <?php post_class() ?>>
<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
<div class="post-date"><?php the_time('F jS, Y') ??></div>
<?php the_excerpt(); ?>
<div class="categories">Posted in:
<?php the_category(', '); ?>
</div><!-- /categories -->
<div class="tags">Tags: <?php the_tags(); ?></div>
<div class="comments">
<?php comments_popup_link('No comments', '1 comment', '% comments'); ?>
</div> <!-- /comments -->
</div><!-- /posts -->
<?php endwhile; ?>
<div class="navigation">
<div class="align-left">
<?php next_posts_link('« Older Entries') ?></div>
<div class="align-right">
<?php previous_posts_link('Nexer Entries »') ?></div>
</div><!-- /navigation -->
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, the page you are looking for does not exist!</p>
<?php get_search_form(); ?>
<?php endif; ?>
</div><!-- /content -->
<?php get_footer(); ?>