在每篇文章末尾增加作者信息尤其适用于多作者的博客,简单明了,方便读者了解文章作者的个人信息。
本站示例:
HTML
<div id="article-author">
<div id="author-image">
<?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '80' ); }?>
</div>
<div id="author-text">
<strong><?php the_author_link(); ?></strong>
<p><?php the_author_description();?></p>
</div>
</div>
CSS
#article-author {
margin-top: 15px;
margin-bottom: 15px;
margin-top: 30px;
border: 1px solid #d9d9d9;
clear: both;
background-color: #eee;
padding: 10px;
width: 468px;
height: 120px;
}
#author-image {
height: 80px;
width: 80px;
border: 1px solid #d9d9d9;
background-color: #FFFFFF;
padding: 10px;
margin-bottom: 8px;
float: left;
}
#author-text {
float: left;
margin-left: 10px;
width: 350px;
}
上面显示的用户信息,可以在 WordPress 控制板/用户 中设置,如下所示:
上面涉及到一些Wordpress函数,这里就不多说了,具体请参考 WordPress函数讲解-Author Template Tags。
有没有类似的插件呢
这个太棒了…;)