-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
executable file
·37 lines (37 loc) · 1.41 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
<?php get_header(); ?>
<div role="main" id="main">
<div id="content">
<div class="place"><?php the_place('首页'); ?></div>
<?php if(have_posts())the_post(); ?>
<div class="archive-info">
<?php if ( is_day() ) : ?>
<h1><?php printf( __( '日期归档: %s' ), '<span>' . get_the_date() . '</span>' ); ?></h1>
<?php elseif ( is_month() ) : ?>
<h1><?php printf( __( '月份归档: %s' ), '<span>' . get_the_date( 'F Y' ) . '</span>' ); ?></h1>
<?php elseif ( is_year() ) : ?>
<h1><?php printf( __( '年度归档: %s' ), '<span>' . get_the_date( 'Y' ) . '</span>' ); ?></h1>
<?php elseif ( is_tag() ) : ?>
<h1><?php printf( __( '标签: %s' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?></h1>
<?php elseif(is_category()) : ?>
<h1><?php single_cat_title('',true); ?></h1>
<div class="category-description"><?php echo category_description(); ?></div>
<?php else : ?>
<h1><?php _e( '归档' ); ?></h1>
<?php endif; ?>
</div>
<?php rewind_posts(); ?>
<div id="post-list">
<?php
while(have_posts()):the_post();
$format = get_post_format();
get_template_part('templates/tpl-loop',$format);
endwhile;
?>
</div>
<?php get_template_part('templates/tpl-pagenavi'); ?>
</div>
<aside role="sidebar">
<?php get_sidebar(); ?>
</aside>
</div>
<?php get_footer(); ?>