June 26th, 2008 让旧主题支持WordPress的Gravatars
从WordPress 2.5开始WordPress已经是不需要插件原生支持默认支持Gravatars了的,
首先打开后台中Setting » Discussion中的相关设置;
对于旧主题支持WordPress的Gravatars也可以一步到位,把以下调用代码代码
<?php if(function_exists("get_avatar")) echo get_avatar( $comment, 32 ); ?>
插入到comments.php里的
<?php comment_author_link() ?>
附近即可。
当然,也可以做下美化,比如:
.avatar {
border: 1px dashed #d3d3d3;
padding: 2px;
float: right;
margin-top: 3px;
}
如果你需要更多的设置参数,请移步到Gravatars and WordPress 2.5
相关文章:- 兼容IE,Firefox的图片自动缩放CSS代码
- Country Codes of the World
- 让你的网站也支持简繁转换
- 在线二维码生成 —— QR-Code Generator
- QR Code Editor —— 手机二维码软件
测试头像··
换个邮箱测试下- -
恩,很帅!!!