有没有办法换掉默认头像

讨论程序使用中的问题
回复
suzuka
帖子: 2
注册时间: 2022年 10月 30日 18:21

有没有办法换掉默认头像

帖子 suzuka »

如题,gravatar的默认头像好难看,有人没设置过的话显示那个大大的G好扎眼
Lopwon
帖子: 173
注册时间: 2016年 11月 14日 11:19

Re: 有没有办法换掉默认头像

帖子 Lopwon »

打开文件 var/Widget/Comments/Archive.php

找到

代码: 全选

$singleCommentOptions->defaultAvatar
替换为

代码: 全选

'图片链接'
例如

代码: 全选

'http://cdn.snapic.cn/img/logo.png'
以上修改作用于主题,如果不生效,请检查在用主题是否重新定义了评论,在对应文件搜索修改。如果想让后台也生效,需要修改 Common.php 文件的头像地址。
javedpcit
帖子: 1
注册时间: 2022年 12月 6日 19:35

Re: 有没有办法换掉默认头像

帖子 javedpcit »

To look at the different default gravatars, go to Settings » Discussion and scroll to the Avatars section. This is where you can configure and change the gravatar settings for your WordPress blog, or website.
lenkalee266
帖子: 1
注册时间: 2023年 1月 4日 12:52

Re: 有没有办法换掉默认头像

帖子 lenkalee266 »

This is, in my opinion, one of the best posts that you have made. Your work is quite outstanding in both quality and quantity. I am grateful to you for it. Klondike Solitaire
回复