我想说的是怎么修改CSS文件,使头像的大小和位置适合自己。
.gravatar {
float:left;
padding: 3px;
border: 1px solid #000; 边框形状
background: #fff; 修改背景颜色
clear:both;
}
这里float:left表示头像的位置,改为float:right头像就出现在右边
把<?php if (function_exists(’gravatar‘)) { gravatar_image_link(); } ?>放入留言的foreach段中
代码具体位置如下:
在这个<div class=”comment-body”><?php comment_text() ?></div>之前插入就可以了
最后说下怎么放置默认小头像
在/wp-content/gravatars/新建一个文件夹random放置你的头像
然后在后台设置
Default gravatar image (relative to website document root path):
/home/aspx1314/aspx1314.cn/wp-content/gravatars/random/
这样就可以了
本文来源于.NET伊甸园
http://aspx1314.cn , 原文地址:
http://aspx1314.cn/?p=186