forked from ilaoniu/pluto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom-archive.php
58 lines (55 loc) · 2.38 KB
/
custom-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
<?php
/*
Template Name: 归档页面
*/
error_reporting(0);
?>
<?php get_header(); ?>
<!-- 归档 -->
<div class="posts clearfix">
<article <?php post_class('single-post'); ?>>
<div class="post-wrap">
<header class="post-title wb">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_title(); ?>
</a>
</header>
<div class="post-inner">
<div class="post-right">
<div class="post-content wb clearfix">
<?php if ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endif; ?>
<div class="archivePost">
<ul class="timeline">
<?php $count_posts = wp_count_posts(); $published_posts = $count_posts->publish;
query_posts( 'posts_per_page=-1' );
while ( have_posts() ) : the_post();
echo '<li class="tl-item"><div class="tl-wrap clearfix">';
echo '<span class="tl-date fl">';
the_time(get_option( 'date_format' ));
echo '</span><div class="tl-content fl">
<a href="';
the_permalink();
echo '" title="'.esc_attr( get_the_title() ).'">';
the_title();
echo '</a></div>';
echo '</div></li>';
$published_posts--;
endwhile;
wp_reset_query(); ?>
</ul>
</div>
</div>
</div>
</div>
</div>
</article>
<!-- 评论 -->
<?php if ('open' == $post->comment_status) { ?>
<div id="comment-jump" class="comments">
<?php comments_template(); ?>
</div>
<?php } ?>
</div>
<?php get_footer(); ?>