在DUX主题的原本详情页的<header></header>中仅添加了文章发布时间、分类、阅读量以及评论,并没有作者项。
如果我们想要显示作者只能从主题代码上动手。
找到single.php,在 <header></header> 中添加以下代码:
<span class="item"><?php echo '作者:';the_author_posts_link(); ?></span>
说明:
- the_author_posts_link() 显示作者的超链接
- the_author() 显示当前文章作者