Files
liaoxin 85ce278768 空笺未寄 v1.0 — 基于 DeepSeek UI 的 WordPress 主题
页面:首页、笺文、微言、拾影、文章详情、作者页
功能:三种展示方式、tucao 自定义类型、评论、分页、灯箱
CSS:DeepSeek 原 CSS + 系统字体 + 头像本地化
安装:激活主题后自动创建页面和导航,刷新固定链接即可
2026-05-03 20:35:41 +08:00

49 lines
1.5 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php get_header(); ?>
<div class="section-header">
<span class="section-title">📜
<?php
if (is_post_type_archive('tucao')) {
echo '微言';
} elseif (is_category()) {
single_cat_title();
} elseif (is_tag()) {
echo '标签:'; single_tag_title();
} elseif (is_search()) {
echo '搜索:' . get_search_query();
} elseif (is_author()) {
echo '作者:' . get_the_author_meta('display_name');
} else {
the_archive_title();
}
?>
</span>
</div>
<?php if (have_posts()) : ?>
<div class="article-list">
<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?>" class="article-item">
<span class="article-title"><?php the_title(); ?></span>
<span class="article-meta">
<span><?php echo get_avatar(get_the_author_meta('ID'), 16); ?> <?php the_author_meta('display_name'); ?></span>
<span><?php echo get_the_date(); ?></span>
</span>
</a>
<?php endwhile; ?>
</div>
<nav class="pagination">
<?php
echo paginate_links(array(
'prev_text' => '',
'next_text' => '',
));
?>
</nav>
<?php else : ?>
<p style="color:var(--ink-lighter);text-align:center;padding:60px 0;">暂无内容</p>
<?php endif; ?>
<?php get_footer(); ?>