root/headlines-new-theme/archive.php

Revision 31, 2.2 kB (checked in by drakewils..@gmail.com, 5 months ago)

headlines theme. for realz this time

Line 
1 <?php get_header(); ?>
2
3 <div id="main-col">
4
5 <?php is_tag(); ?>
6     <?php if (have_posts()) : ?>
7
8         <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
9          <?php /* If this is a category archive */ if (is_category()) { ?>
10     <h2>Archive for the &#8216;<?php single_cat_title(); ?>&#8217; Category</h2>
11         <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
12     <h2>Posts Tagged &#8216;<?php single_tag_title(); ?>&#8217;</h2>
13         <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
14     <h2>Archive for <?php the_time('F jS, Y'); ?></h2>
15          <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
16     <h2>Archive for <?php the_time('F, Y'); ?></h2>
17          <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
18     <h2>Archive for <?php the_time('Y'); ?></h2>
19         <?php /* If this is an author archive */ } elseif (is_author()) { ?>
20     <h2>Author Archive</h2>
21         <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
22     <h2>Blog Archives</h2>
23         <?php } ?>
24
25
26     <!--<div class="navigation">
27         <div><?php next_posts_link('&laquo; Older Entries') ?></div>
28         <div><?php previous_posts_link('Newer Entries &raquo;') ?></div>
29     </div>-->
30
31     <?php while (have_posts()) : the_post(); ?>
32     <div class="post">
33         <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>
34         <p><?php the_time('l, F jS, Y') ?></p>
35         <?php the_content() ?>
36         <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></p>
37     </div>
38
39     <?php endwhile; ?>
40
41     <div class="navigation">
42         <?php previous_posts_link('&laquo; Previous Page') ?>
43         <?php
44         // fails for no next post, but that should have minimal impact
45         if($paged > '0') {
46             echo " | ";
47         }
48         ?>
49         <?php next_posts_link('Next Page &raquo;') ?>
50     </div>
51
52 <?php else : ?>
53
54     <h2>Not Found</h2>
55     <?php include (TEMPLATEPATH . '/searchform.php'); ?>
56
57 <?php endif; ?>
58 </div>
59
60 <?php include (TEMPLATEPATH . '/socialsidebar.php'); ?>
61
62 <?php get_sidebar(); ?>
63
64 <?php get_footer(); ?>
65
Note: See TracBrowser for help on using the browser.