增加了相关文章的设置

6篇
This commit is contained in:
浪子
2024-05-18 21:36:18 +08:00
parent f23e6fad65
commit 3cc50df415
4 changed files with 32 additions and 2 deletions
+21
View File
@@ -0,0 +1,21 @@
<div class="related--content">
<h3 class="related--posts__title">相关文章</h3>
<div class="post--single__related">
<?php $this->related(6)->to($relatedPosts); ?>
<?php while ($relatedPosts->next()): ?>
<div class="post--single__related__item">
<a href="<?php $relatedPosts->permalink(); ?>">
<div class="post--single__related__item__img">
</div>
<div class="post--single__related__item__title">
<?php $relatedPosts->title(25); ?>
</div>
<div class="meta">
<time class="humane--time"><?php $relatedPosts->date('Y-m-d'); ?></time>
</div>
</a>
</div>
<?php endwhile; ?>
</div>
</div>