home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Blogs / wordpress2.6.exe / wordpress2.6 / wp-content / themes / default / archive.php < prev    next >
Encoding:
PHP Script  |  2008-02-20  |  2.4 KB  |  62 lines

  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 single_cat_title(); ?>’ Category</h2>
  10.        <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
  11.         <h2 class="pagetitle">Posts Tagged ‘<?php single_tag_title(); ?>’</h2>
  12.        <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  13.         <h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
  14.        <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  15.         <h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
  16.        <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  17.         <h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
  18.       <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  19.         <h2 class="pagetitle">Author Archive</h2>
  20.        <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  21.         <h2 class="pagetitle">Blog Archives</h2>
  22.        <?php } ?>
  23.  
  24.  
  25.         <div class="navigation">
  26.             <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
  27.             <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
  28.         </div>
  29.  
  30.         <?php while (have_posts()) : the_post(); ?>
  31.         <div class="post">
  32.                 <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>
  33.                 <small><?php the_time('l, F jS, Y') ?></small>
  34.  
  35.                 <div class="entry">
  36.                     <?php the_content() ?>
  37.                 </div>
  38.  
  39.                 <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
  40.  
  41.             </div>
  42.  
  43.         <?php endwhile; ?>
  44.  
  45.         <div class="navigation">
  46.             <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
  47.             <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
  48.         </div>
  49.  
  50.     <?php else : ?>
  51.  
  52.         <h2 class="center">Not Found</h2>
  53.         <?php include (TEMPLATEPATH . '/searchform.php'); ?>
  54.  
  55.     <?php endif; ?>
  56.  
  57.     </div>
  58.  
  59. <?php get_sidebar(); ?>
  60.  
  61. <?php get_footer(); ?>
  62.