feat: 新增聆韵(music)分类——列表页+单页+CSS+导航+Customizer
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php get_header(); ?>
|
||||
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
<article class="music-detail">
|
||||
<a href="/music/" class="back-link">← 返回聆韵</a>
|
||||
|
||||
<?php if (has_post_thumbnail()) : ?>
|
||||
<div class="music-detail__cover">
|
||||
<?php the_post_thumbnail('medium_large', array('alt' => get_the_title())); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h1 class="music-detail__title"><?php the_title(); ?></h1>
|
||||
|
||||
<div class="music-detail__meta">
|
||||
<span><?php echo get_avatar(get_the_author_meta('ID'), 18); ?> <?php the_author_meta('display_name'); ?></span>
|
||||
<span>·</span>
|
||||
<span><?php echo get_the_date('Y-m-d'); ?></span>
|
||||
</div>
|
||||
|
||||
<div class="music-detail__body">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$left = get_adjacent_post(false, '', false);
|
||||
$right = get_adjacent_post(false, '', true);
|
||||
if ($left || $right) : ?>
|
||||
<div class="music-detail__nav">
|
||||
<?php if ($left) : ?>
|
||||
<a href="<?php echo get_permalink($left); ?>">← <?php echo get_the_title($left); ?></a>
|
||||
<?php else: ?>
|
||||
<span></span>
|
||||
<?php endif; ?>
|
||||
<?php if ($right) : ?>
|
||||
<a href="<?php echo get_permalink($right); ?>"><?php echo get_the_title($right); ?> →</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
Reference in New Issue
Block a user