-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
63 lines (60 loc) · 2.19 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
<?php get_header(); ?>
<div id="content">
<div class="archives">
<h1>
<?php if ( is_day() ) : /* if the daily archive is loaded */ ?>
<?php printf( __( 'Daily Archives: <span>%s</span>' ), get_the_date() ); ?>
<?php elseif ( is_month() ) : /* if the montly archive is loaded */ ?>
<?php printf( __( 'Monthly Archives: <span>%s</span>' ), get_the_date('F Y') ); ?>
<?php elseif ( is_year() ) : /* if the yearly archive is loaded */ ?>
<?php printf( __( 'Yearly Archives: <span>%s</span>' ), get_the_date('Y') ); ?>
<?php else : /* if anything else is loaded, ex. if the tags or categories template is missing this page will load */ ?>
Blog Archives
<?php endif; ?>
</h1>
</div><!-- .archives -->
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="single-post">
<h2>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark">
<?php the_title(); ?>
</a>
</h2>
<p class="date">
Written on <?php the_time('F j, Y'); ?> by <?php the_author() ?>.
</p>
<div class="post-excerpt">
<?php the_excerpt(); /* the excerpt is loaded to help avoid duplicate content issues */ ?>
</div>
<!-- <div class="post-meta">
<p>
<?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?>
<br />
Categories: <?php the_category(', ') ?>
<br />
<?php if (the_tags('Tags: ', ', ', ' ')); ?>
</p>
</div> -->
</div><!--.single-post-->
<?php endwhile; else: ?>
<div class="no-results">
<p><strong>There has been an error.</strong></p>
<p>We apologize for any inconvenience, please <a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>">return to the home page</a> or use the search form below.</p>
<?php get_search_form(); /* outputs the default Wordpress search form */ ?>
</div><!--noResults-->
<?php endif; ?>
<nav class="oldernewer">
<div class="older">
<p>
<?php next_posts_link('« Older Entries') ?>
</p>
</div><!--.older-->
<div class="newer">
<p>
<?php previous_posts_link('Newer Entries »') ?>
</p>
</div><!--.older-->
</nav><!--.oldernewer-->
</div><!--#content-->
<?php get_sidebar(); ?>
<?php get_footer(); ?>