/
archive.php
74 lines (64 loc) · 3.63 KB
/
archive.php
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
73
74
<?php get_header(); ?>
<div id="content">
<div id="main">
<?php if (have_posts()) : ?>
<div class="item entry">
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class="pagetitle">Archive for the ‘<?php single_cat_title(); ?>’ category</h2>
<?php /* If this is a tag archive */ } elseif( function_exists('is_tag') ) { if(is_tag()){ ?>
<h2 class="pagetitle">Posts tagged ‘<?php single_tag_title(); ?>’</h2>
<?php /* If this is a daily archive */} } elseif (is_day()) { ?>
<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class="pagetitle">Author archive</h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="pagetitle">Blog archives</h2>
<?php } ?>
</div>
<?php while (have_posts()) : the_post(); ?>
<?php /*?>item<?php */?>
<div class="item entry" id="post-<?php the_ID(); ?>">
<div class="itemhead">
<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div class="chronodata"><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></div>
</div>
<div class="storycontent">
<?php the_excerpt(); ?>
</div>
<div class="metadata">
<div class="category">
Tagged and categorized as: <?php if (the_category(', ')) the_category(); ?>
<?php if ( function_exists('wp_tag_cloud') ) : ?>
<?php the_tags(', ', ', ', ''); ?>
<?php endif; ?>
<?php edit_post_link('Edit', ' | ', ''); ?>
<?php comments_popup_link(' | No comments yet.', ' | One comment.', ' | % Comments '); ?>
<?php if( pings_open() ) : ?>
| <a href="<?php trackback_url() ?>" rel="trackback" title="Uniform Resource Identifier">TrackBack
URI</a><?php endif; ?>
</div>
</div>
</div>
<?php /*?>end item<?php */?>
<?php comments_template(); // Get wp-comments.php template ?>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Next Entries »') ?></div>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that has no entries.</p>
<?php endif; ?>
</div>
<div id="sidebar">
<?php get_sidebar(); ?>
</div>
<div style="height:1px; clear:both; width:100%;"></div>
</div>
<?php get_footer(); ?>