首页 -> Wordpress -> 在wordpress中显示gravatar头像

« »



在wordpress中显示gravatar头像

现在的wordpress版本已经可以通过设置直接显示出来,可是有些主题在设计的时候,并没有加入这个函数,比方说我使用的这个主题,想要显示gravatar头像,只有自己修改主题里的comments.php才能显示。

只需要把第3行的代码复制到这个位置,保存即可

1
2
3
4
<li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID
() ?>">
<?php echo get_avatar( $comment, 30 ); ?>
<cite><?php comment_author_link() ?></cite>


本站原创,转载请注明: 转载自Flox's Blog

本文链接地址: 在wordpress中显示gravatar头像

Tag:gravatar头像, Wordpress, 在主题显示gravatar头像

相关日志

  1. 2010年2月24日12:10

    大部分主题现在都是支持的

  2. Firm
    2010年2月24日12:11

    现在的大部分主题都是支持的