-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
48 lines (45 loc) · 855 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
41
42
43
44
45
46
47
48
<?php get_header(); ?>
<h2><?php
if (is_category()) {
single_cat_title();
}
else if (is_tag()) {
single_tag_title();
}
else if (is_author()) {
the_post();
echo 'Articles By: ' . get_the_author();
rewind_posts();
}
else if (is_day()) {
echo 'Articles on Day: ' . get_the_date();
}
else if (is_month()) {
echo 'Articles in Month: ' . get_the_date('F Y');
}
else if (is_year()) {
echo 'Articles in Year: ' . get_the_date('Y');
}
else {
echo 'Archives:';
}
?></h2>
<div class="row">
<div class="col-sm-9 blog-main">
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
get_template_part('article', get_post_format());
?> <hr/> <?php
}
}
else {
get_template_part('article', 'none');
}
?>
</div>
<?php get_sidebar(); ?>
</div>
<?php pagination(); ?>
<?php get_footer(); ?>