WordPress评论壹号娱乐头像无法显示 解决gravatar头像被屏蔽巅峰国际下载app
时间:2025-06-21 03:32:12 阅读(143)
//评论头像gravatar显示function get_ssl_avatar($avatar) add_filter('get_avatar', 'get_ssl_avatar');
代码中的链接地址http://cn.gravatar.com/也可以换成https://secure.gravatar.com/。这两个Gravatar头像地址都能访问。把以下代码复制放到该文件中保存即可。1.gravatar.com等网址有时无法访问,
安装wordpress主题后发现评论头像无法显示。导致无法读取头像。仪表盘的“活壹号娱乐动”小工具的头像有的会出现撑破现象,巅峰国际下载app打开functions.php文件,在wordpress主题-外观-编辑中,这导致国内有的Wordpress网站头像无法显示。
解决wordpress仪表盘头像错位
另外,从WordPress4.2开始,如下图头像显示
<img alt="" data-original="http://0.gravatar.com/avatar/30d39126ec95ba3b703696e17c7432ab?s=54&d=http%3A%2F%2F127.0.0.1%2Fwp-content%2Fthemes%2FGit-master%2Fimg%2Fdefault.png&r=g" srcset="http://0.gravatar.com/avatar/30d39126ec95ba3b703696e17c7432ab?s=108&d=http%3A%2F%2F127.0.0.1%2Fwp-content%2Fthemes%2FGit-master%2Fimg%2Fdefault.png&r=g 2x" class="avatar avatar-54 photo" height="54" width="54" src="http://127.0.0.1/wp-content/themes/Git-master/img/default.png">
可以看出0.gravatar.com,因为wo壹巅峰国际下载app号娱乐rdpress程序属于国外,如下图:主要是width和height设置问题;将下面的代码添加到主题的functions.php保存即可解决gravatar头像撑破问题。
/*** WordPress 4.2 修复仪表盘头像错位* http://www.bokequ.com/310.html*/function fixed_activity_widget_avatar_style(){echo '<style type="text/css">#activity-widget #the-comment-list .avatar {position: absolute;top: 13px;width: 50px;height: 50px;}</style>';}add_action('admin_head', 'fixed_activity_widget_avatar_style' );
以上就是wordpress的评论头像 Gravatar头像打不开解决方法,
这里介绍解决wordpress头像不能显示的一个方法。国内屏蔽了Gravatar,
上一篇: 圆形滚动404动画页面特效
猜你喜欢
- 分类目录缩略图自动截图/生成api有哪些
- Adobe Dreamweaver cc 2018中文版本
- UNI Slumps 17% Following SEC Developments, BTC, ETH, DOGE, TON on the Rise (Market Watch)
- HTML5+three实现3D酷炫拼魔方游戏代码
- 网页出现Uncaught SyntaxError: Unexpected token错误
- json在线工具箱优化版源码
- 健康能量评估神器荣耀手表 Fit正式发布:轻享运动健康,499元起,你准备好了吗?
- 黑色清爽大气wordpress博客主题,html静态模板
- 华为新款智能手表WATCH 5将与Pura 80系列手机携手亮相,科技与时尚的完美融合