-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
executable file
·76 lines (49 loc) · 2.01 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
75
76
<?php
global $wp_query;
$total_results = $wp_query->found_posts;
?>
<?php get_header(); ?>
<aside class="bio">
<h2>
<?php
if ( is_day() ) :
printf( __( 'Daily Archives: %s', 'simplex' ), '<span>' . get_the_date() . '</span> (' . $total_results . ' entries)' );
elseif ( is_month() ) :
printf( __( 'Monthly Archives: %s', 'simplex' ), '<span>' . get_the_date( 'F Y' ) . '</span> (' . $total_results . ' entries)' );
elseif ( is_year() ) :
printf( __( 'Yearly Archives: %s', 'simplex' ), '<span>' . get_the_date( 'Y' ) . '</span> (' . $total_results . ' entries)' );
else :
_e( 'Archives', 'simplex' );
endif;
?>
</h2>
</aside>
<div class="content">
<section class="posts nine columns omega">
<?php query_posts($query_string . '&cat=-5'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<article class="post">
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<p class="date">Posted <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?>
<?php if(get_the_tags()): ?>
in <?php the_tags('', ', '); ?>
<?php endif; ?>
</p>
<?php the_excerpt(); ?>
</article>
<?php endwhile; ?>
<nav>
<?php if(get_previous_posts_link()): ?>
<p class="newer"><?php previous_posts_link('Newer Posts',0); ?></p>
<?php endif; ?>
<?php if(get_next_posts_link()): ?>
<p class="older"><?php next_posts_link('Older Posts',0); ?></p>
<?php endif; ?>
</nav>
<?php else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
</section>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>