标签:作者头像

WordPress 作者头像调用方法

WordPress作者头像调用有很多种方法,整理如下: 1. 在文章页面调用作者头像, 非常简单, 一句话就可以实现: <?php echo get_avatar( get_the_author_email(), 60 ); ?> 2. 在作者列表页面调用作者头像, 方法和页面有点不同, 不过也不麻烦, 具体代码如下: 在author-template.php模板里添加下面的代码即可: $author_email = get_the_author_email(); $avatar =  get_avatar($author->ID ,32); 然后将 $link = ‘<a href=&#8221 […]

查看更多