GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Hemingway is a template for Wordpress
Homepage: http://warpspire.com/hemingway
Clone URL: git://github.com/kneath/hemingway.git
kneath (author)
Mon Mar 24 00:26:55 -0700 2008
hemingway / archive.php
100755 72 lines (50 sloc) 2.212 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php get_header(); ?>
 
  <div id="primary" class="single-post">
  <div class="inside">
    <div class="primary">
 
      <?php if (have_posts()) : ?>
  
      <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
      <?php /* If this is a category archive */ if (is_category()) { ?>        
      <h1><?php _e("Archive for the") ?> '<?php echo single_cat_title(); ?>' <?php _e("category") ?></h1>
      
      <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
      <h1><?php _e("Archive for")?> <?php the_time('F jS, Y'); ?></h1>
      
     <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
      <h1><?php _e("Archive for") ?> <?php the_time('F, Y'); ?></h1>
  
      <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
      <h1><?php _e("Archive for") ?> <?php the_time('Y'); ?></h1>
      
      <?php /* If this is a search */ } elseif (is_search()) { ?>
      <h1><?php _e("Search Results") ?></h1>
      
      <?php /* If this is an author archive */ } elseif (is_author()) { ?>
      <h1><?php _e("Author Archive") ?></h1>
  
      <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
      <h1><?php _e("Blog Archives") ?></h1>
  
      <?php } ?>
 
     <ul class="dates">
       <?php while (have_posts()) : the_post(); ?>
      <li>
        <span class="date"><?php the_time( $hemingway->date_format() . '.y' ) ?></span>
        <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
         <?php _e("posted in") ?>
        <?php the_category(', ') ?>     
      </li>
    
      <?php endwhile; ?>
    </ul>
    
    <div class="navigation">
      <div class="left"><?php next_posts_link('&laquo; Previous Entries') ?></div>
      <div class="right"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    </div>
 
  
  <?php else : ?>
 
    <h1>Not Found</h1>
 
  <?php endif; ?>
    
  </div>
  
  <div class="secondary">
    <h2><?php _e("About the archives") ?></h2>
    <div class="featured">
      <p><?php _e("Welcome to the archives here at") ?> <?php bloginfo('name'); ?>. <?php _e("Have a look around") ?>.</p>
      
    </div>
  </div>
  <div class="clear"></div>
  </div>
  </div>
 
<?php get_sidebar(); ?>
 
<?php get_footer(); ?>