forked from rjmccollam/Bare-WP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
45 lines (23 loc) · 1.04 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
<?php get_header(); ?>
<?php get_template_part('partials/secondary-page-title'); ?>
<section class="content container clearfix">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<h2>
<?php if (is_category()) { ?><?php single_cat_title(); ?>
<?php } elseif( is_tag() ) { ?>Posts Tagged ‘<?php single_tag_title(); ?>’
<?php } elseif (is_day()) { ?>Archive for <?php the_time('F jS, Y'); ?>
<?php } elseif (is_month()) { ?>Archive for <?php the_time('F, Y'); ?>
<?php } elseif (is_year()) { ?>Archive for <?php the_time('Y'); ?>
<?php } elseif (is_author()) { ?>Author Archive
<?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>Blog Archives<?php } ?>
</h2>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('partials/post'); ?>
<?php endwhile; ?>
<?php get_template_part('partials/nav'); ?>
<?php else : ?>
<h2>Nothing found</h2>
<?php endif; ?>
</section><!-- end content -->
<?php get_footer(); ?>