-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
40 lines (23 loc) · 957 Bytes
/
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
<?php get_header(); ?>
<section class="content">
<?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()) { ?>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h1>Entries from <?php the_time('F Y'); ?></h1>
<?php } ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part( 'templates/partials/content', get_post_format() ); ?>
<?php endwhile; ?>
<?php else : ?>
<h2>Welp, we couldn't find that...try again?</h2>
<p class="post_date">* * *</p>
<div class="entry">
<?php get_template_part( 'searchform.php' ); ?>
</div>
<?php endif; ?>
</section> <!-- /content -->
<?php get_template_part( 'templates/partials/inc', 'nav' ); ?>
<?php //if ( is_active_sidebar(1) ) { get_sidebar(); } ?>
</section> <!-- /container -->
<?php get_footer(); ?>