/
archive.php
90 lines (84 loc) · 2.67 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
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
<?php get_header(); ?>
<!--内容模块-->
<div class="content">
<div class="content-main">
<div class="new">
<div class="new-1">当前位置:</div>
<div class="new-2">
<a href="<?php bloginfo('url'); ?>">首页</a>
<small>></small>
<?php if ( have_posts() ) : ?>
<span><?php echo mm_get_the_archive_title(); ?> </span>
</div>
</div>
<?php while (have_posts()) : the_post(); ?>
<article class="excerpt">
<div class="excerpt-img">
<a href="<?php the_permalink(); ?>">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
} else {
echo '<img src="';
echo bloginfo('template_url');
echo '/img/zhandian.png"'.' alt="图片"/>';
}
?>
</a>
</div>
<header class="excerpt-header">
<a href="<?php $category = get_the_category(); echo get_category_link($category[0]->term_id ) ?>" class="label">
<?php
echo $category[0]->cat_name;
?>
</a>
<i class="label-arrow"></i>
<div class="excerpt-header-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php echo mb_strimwidth(get_the_title(),0,50,'...'); ?></a>
</div>
</header>
<div class="exceprt-information">
<span class="group">
<i class="iconfont iconfont-exceprt"></i>
<?php the_author(); ?>
</span>
<span class="group">
<i class="iconfont iconfont-exceprt"></i>
<?php the_time('Y-m-d') ?>
</span>
<span class="group">
<i class="iconfont iconfont-exceprt"></i>
<?php echo post_views(); ?>浏览
</span>
<span class="group">
<i class="iconfont iconfont-exceprt"></i>
<?php comments_popup_link('0 条评论', '1 条评论', '% 条评论', '', '评论已关闭'); ?>
</span>
</div>
<div class="note">
<?php the_excerpt(); ?>
</div>
<a href="<?php the_permalink(); ?>" class="next">继续阅读>></a>
<div class="tags">
<?php the_tags('','','') ?>
<div style="height: 22px;width: 1px;display: inline-block;"></div>
</div>
</article>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
<div class="pagination">
<ul>
<?php par_pagenavi(3); ?>
</ul>
</div>
</div>
<?php get_sidebar();?>
<!--rollbar板块-->
<div class="roolbar">
<ul>
<li><a id="roolbar-up"><i class="iconfont iconfont-rollbar"></i></a></li>
<li><a id="roolbar-down"><i class="iconfont iconfont-rollbar"></i></a></li>
</ul>
</div>
<?php get_footer(); ?>