forked from yuannancheng/fictional-university
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
45 lines (41 loc) · 1.18 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
<?php
get_header();
pageBanner([
'title' => get_the_archive_title(),
'subtitle' => get_the_archive_description()
]);
?>
<div class="container container--narrow page-section">
<?php
while (have_posts()) {
the_post();
?>
<div class="post-item">
<!-- 显示文章标题 -->
<h2 class="headline headline--medium headline--post-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h2>
<!-- 显示作者、发布日期、类型 -->
<div class="metabox">
<p>
由
<?php the_author_posts_link(); ?>
于
<?php the_time('Y年m月d日 H:i'); ?>
发布在
<?php echo get_the_category_list(', '); ?>
中
</p>
</div>
<!-- 显示摘要 -->
<div class="generic-content">
<?php the_excerpt(); ?>
<p><a class="btn btn--blue" href="<?php the_permalink(); ?>">阅读更多 »</a></p>
</div>
</div>
<?php
}
echo paginate_links(); // 输出分页器
?>
</div>
<?php get_footer(); ?>