-
Notifications
You must be signed in to change notification settings - Fork 1
/
archive.php
41 lines (32 loc) · 1.2 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
<?php get_header(); ?>
<div class="row">
<div class="eight columns">
<h1>
<?php
$term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
if ($term) {
echo $term->name;
} elseif (is_day()) {
printf(__('Daily Archives: %s', 'roots'), get_the_date());
} elseif (is_month()) {
printf(__('Monthly Archives: %s', 'roots'), get_the_date('F Y'));
} elseif (is_year()) {
printf(__('Yearly Archives: %s', 'roots'), get_the_date('Y'));
} elseif (is_author()) {
global $post;
$author_id = $post->post_author;
printf(__('Author Archives: %s', 'roots'), get_the_author_meta('user_nicename', $author_id));
} else {
single_cat_title();
}
?>
</h1>
<?php get_template_part('loop', 'category'); ?>
</div>
<aside id="sidebar" class="four columns" role="complementary">
<div class="container">
<?php dynamic_sidebar("Blog Sidebar"); ?>
</div>
</aside><!-- /#sidebar -->
</div>
<?php get_footer(); ?>