[ Index ]

WordPress Source Cross Reference

title

Body

[close]

/wp-content/themes/default/ -> archive.php (source)

   1  <?php get_header(); ?>
   2  
   3      <div id="content" class="narrowcolumn">
   4  
   5          <?php if (have_posts()) : ?>
   6  
   7           <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
   8  <?php /* If this is a category archive */ if (is_category()) { ?>
   9          <h2 class="pagetitle">Archive for the '<?php echo single_cat_title(); ?>' Category</h2>
  10  
  11         <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  12          <h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
  13  
  14       <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  15          <h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
  16  
  17          <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  18          <h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
  19  
  20        <?php /* If this is a search */ } elseif (is_search()) { ?>
  21          <h2 class="pagetitle">Search Results</h2>
  22  
  23        <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  24          <h2 class="pagetitle">Author Archive</h2>
  25  
  26          <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  27          <h2 class="pagetitle">Blog Archives</h2>
  28  
  29          <?php } ?>
  30  
  31  
  32          <div class="navigation">
  33              <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
  34              <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
  35          </div>
  36  
  37          <?php while (have_posts()) : the_post(); ?>
  38          <div class="post">
  39                  <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
  40                  <small><?php the_time('l, F jS, Y') ?></small>
  41  
  42                  <div class="entry">
  43                      <?php the_content() ?>
  44                  </div>
  45  
  46                  <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p> 
  47  
  48              </div>
  49  
  50          <?php endwhile; ?>
  51  
  52          <div class="navigation">
  53              <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
  54              <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
  55          </div>
  56  
  57      <?php else : ?>
  58  
  59          <h2 class="center">Not Found</h2>
  60          <?php include  (TEMPLATEPATH . '/searchform.php'); ?>
  61  
  62      <?php endif; ?>
  63  
  64      </div>
  65  
  66  <?php get_sidebar(); ?>
  67  
  68  <?php get_footer(); ?>

Your comment here...

Name: Location:
Comments:


List: Classes | Functions | Variables | Constants | Tables

Generated: Sat Jul 15 11:57:04 2006 Courtesy of Taragana