forked from Tokinx/Wing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-archive.php
executable file
·53 lines (53 loc) · 2.13 KB
/
page-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
<?php
if ( ! defined( 'ABSPATH' ) ) { exit; }
/*
Template Name: 文章归档
*/
get_header();
?>
<article class="article archives" itemscope itemtype="https://schema.org/Article">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
require_once( "inc/article-header.php" );
}
}; ?>
<div class="timeline" itemprop="articleBody">
<?php foreach ( get_my_archives() as $block ): ?>
<div class="timeline-item">
<div class="timeline-left">
<div class="timeline-icon icon-lg"><i class="czs-medal"></i></div>
</div>
<div class="timeline-content pt-0">
<div class="tile">
<div class="tile-content">
<p class="tile-subtitle text-large text-bold"><?= $block['year'] ?></p>
</div>
<div class="tile-action">
<span class="chip"><?= count( $block['articles'] ) ?></span>
</div>
</div>
</div>
</div>
<?php foreach ( $block["articles"] as $article ): ?>
<div class="timeline-item">
<div class="timeline-left">
<div class="timeline-icon"></div>
</div>
<div class="timeline-content pt-0">
<div class="tile">
<div class="tile-content">
<p class="tile-subtitle">
<a href="<?= $article['permalink'] ?>"><?= $article['title'] ?></a>
- <?= $article['month-day'] ?>
</p>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</article>
<?php get_footer(); ?>