-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-archive.php
113 lines (72 loc) · 3.24 KB
/
template-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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
/*
Template Name: Archive Template
*/
?>
<?php get_header(); ?>
<div class="content thin">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class('post single'); ?>>
<div class="post-inner">
<div class="post-header">
<h1 class="post-title"><?php the_title(); ?></h1>
</div> <!-- /post-header -->
<div class="post-content">
<?php the_content(); ?>
</div> <!-- /post-content -->
<div class="clear"></div>
<div class="archive-container">
<h3><?php _e('Posts','fukasawa') ?></h3>
<ul class="posts-archive-list">
<?php $posts_archive = get_posts('numberposts=-1');
foreach($posts_archive as $post) : ?>
<li>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_title();?>
</a>
<span><?php the_time(get_option('date_format')); ?></span>
</li>
<?php endforeach; ?>
</ul>
<?php wp_reset_query(); ?>
<h3><?php _e('Categories','fukasawa') ?></h3>
<ul>
<?php wp_list_categories('title_li='); ?>
</ul>
<h3><?php _e('Tags','fukasawa') ?></h3>
<ul>
<?php $tags = get_tags();
if ($tags) {
foreach ($tags as $tag) {
echo '<li><a href="' . get_tag_link( $tag->term_id ) . '" title="' . sprintf( __( "View all posts in %s", 'fukasawa' ), $tag->name ) . '" ' . '>' . $tag->name.'</a></li> ';
}
}
wp_reset_query();?>
</ul>
<h3><?php _e('Contributors', 'fukasawa') ?></h3>
<ul>
<?php wp_list_authors(); ?>
</ul>
<h3><?php _e('Archives by Year', 'fukasawa') ?></h3>
<ul>
<?php wp_get_archives('type=yearly'); ?>
</ul>
<h3><?php _e('Archives by Month', 'fukasawa') ?></h3>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
<h3><?php _e('Archives by Day', 'fukasawa') ?></h3>
<ul>
<?php wp_get_archives('type=daily'); ?>
</ul>
</div> <!-- /archive-container -->
</div> <!-- /post-inner -->
<?php if ( comments_open() ) : ?>
<?php comments_template( '', true ); ?>
<?php endif; ?>
</div> <!-- /post -->
<?php endwhile; else: ?>
<p><?php _e("We couldn't find any posts that matched your query. Please try again.", "fukasawa"); ?></p>
<?php endif; ?>
</div> <!-- /content -->
<?php get_footer(); ?>