This repository has been archived by the owner on Oct 21, 2020. It is now read-only.
/
archive.php
71 lines (47 loc) · 2.02 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
<?php get_header(); ?>
<div id="content-container" class="fl-clearfix fl-col-mixed2 fl-push">
<?php get_sidebar("non-index"); ?>
<section id="nav:content" class="fl-clearfix fl-col-main" role="main">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // hack: set $post so that the_date() works ?>
<?php if (is_category()) { ?>
<h1>Archive for the "<?php single_cat_title(); ?>" Category</h1>
<?php if (strlen(trim(category_description())) > 0 && trim(category_description()) != "<br />") {
echo category_description();
}
?>
<?php } elseif(is_tag()) { ?>
<h1>Posts Tagged "<?php single_tag_title(); ?>"</h1>
<?php } elseif (is_day()) { ?>
<h1>Archive for <?php the_time('F jS, Y'); ?></h1>
<?php } elseif (is_month()) { ?>
<h1>Archive for <?php the_time('F, Y'); ?></h1>
<?php } elseif (is_year()) { ?>
<h1>Archive for <?php the_time('Y'); ?></h1>
<?php } elseif (is_author()) { ?>
<h1>Author Archive</h1>
<?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h1>Blog Archives</h1>
<?php } ?>
<?php query_posts($query_string); ?>
<ul class="fl-grid">
<?php while (have_posts()) : the_post(); ?>
<li><?php include (TEMPLATEPATH . '/inc/single-post-summary.php' ); ?></li>
<?php endwhile; ?>
</ul>
<?php
$next_posts = get_next_posts_link('« Older archives');
$prev_posts = get_previous_posts_link('Newer archives »');
if( $next_posts || $prev_posts ) { ?><nav id="next-prev-links">
<ul class="fl-container-flex fl-clearfix">
<?php if( $next_posts ) echo '<li class="alignleft">'.$next_posts.'</li>'; ?>
<?php if( $prev_posts ) echo '<li class="alignright">'.$prev_posts.'</li>'; ?>
</ul>
</nav><!-- /#next-prev-links -->
<?php } ?>
<?php else : ?>
<?php include (TEMPLATEPATH . '/inc/not-found.php' ); ?>
<?php endif; ?>
<?php get_footer(); ?>
</section><!-- /#nav:content -->
</div><!-- /#content-container -->