markyeoj

Untitled

Nov 22nd, 2011
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.83 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Archive Page
  4.  
  5. */
  6.  
  7.  
  8.  
  9. ?>
  10.  
  11. <?php get_header(); ?>
  12.     <div id ="maincontent"class = "group">
  13.             <?php include'leftsidebar.php';?>
  14.         <div id = "allcontent"class="archive">
  15.         <?php if (have_posts()) : ?>
  16.  
  17.             <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
  18.  
  19.             <?php /* If this is a category archive */ if (is_category()) { ?>
  20.                 <h2>Archive for the &#8216;<?php single_cat_title(); ?>&#8217; Category</h2>
  21.  
  22.             <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
  23.                 <h2>Posts Tagged &#8216;<?php single_tag_title(); ?>&#8217;</h2>
  24.  
  25.             <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
  26.                 <h2>Archive for <?php the_time('F jS, Y'); ?></h2>
  27.  
  28.             <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
  29.                 <h2>Archive for <?php the_time('F, Y'); ?></h2>
  30.  
  31.             <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
  32.                 <h2>Archive for <?php the_time('Y'); ?></h2>
  33.  
  34.             <?php /* If this is an author archive */ } elseif (is_author()) { ?>
  35.                 <h2>Author Archive</h2>
  36.  
  37.             <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
  38.                 <h2>Blog Archives</h2>
  39.            
  40.             <?php } ?>
  41.  
  42.             <?php include (TEMPLATEPATH . '/inc/nav.php' ); ?>
  43.             <ul>
  44.             <?php while (have_posts()) : the_post(); ?>
  45.                 <li><div <?php post_class() ?>>
  46.                
  47.                     <h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
  48.                    
  49.                     <?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>
  50.  
  51.                     <div class="entry">
  52.                         <?php the_content(); ?>
  53.                     </div>
  54.  
  55.                 </div></li>
  56.             <?php endwhile; ?>
  57.             </ul>
  58.             <?php include (TEMPLATEPATH . '/inc/nav.php' ); ?>
  59.            
  60.     <?php else : ?>
  61.  
  62.         <h2>Nothing found</h2>
  63.  
  64.     <?php endif; ?>
  65.  
  66.  
  67.         </div>
  68.  
  69.     </div>
  70.  
  71. <?php get_footer(); ?>
  72.  
Advertisement
Add Comment
Please, Sign In to add comment