如何为 wpForo 论坛用户添加默认...
 
Notifications
Clear all

如何为 wpForo 论坛用户添加默认头像?

1 帖子
1 Users
0 Reactions
11.6 K 查看
清风許来
(@xu)
管理员 管理员 注册会员
已加入: 6 年 前
帖子: 85
Topic starter  

设置头像在核心 Wordpress 设置中,特别是仪表盘-设置-讨论,您将在该页面底部附近找到设置,

如果您想要一个能更好地反映您的论坛徽标、品牌或利基市场的默认头像,您必须创建一个,最好是 150 x 150 像素的 png。正确命名,并通过 WP 媒体管理器上传。然后在您的主题函数文件中添加与此类似的代码(编辑正确的路径和域名)。

/*** Default Avatar*/
add_filter( 'avatar_defaults', 'wpb_new_gravatar' );
function wpb_new_gravatar ($avatar_defaults) {
$myavatar = 'https://yourdomian.com/wp-content/uploads/2019/05/forum_default_gravatar.png';
$avatar_defaults[$myavatar] = "Default Gravatar";
return $avatar_defaults;
}

在仪表盘-设置-讨论中,您现在将看到您创建的名为“默认 Gravatar”的新头像,请选择该头像。所有尚未上传或选择自己的头像路径的成员现在都将显示默认头像。

此方法仅适用于 wpForo 1.x 版本,未在 wpForo 2.x 版本测试!!!

 

建议使用 "Leira Letter Avatar" 插件来实现默认头像!


wpForo:中文文档 * 中文论坛 * 扩展插件

IMG 6843


   
回复引用
Topic Tags
Share:
Qcloud 38

Log In

Forgot password?

Forgot password?

Enter your account data and we will send you a link to reset your password.

Your password reset link appears to be invalid or expired.

Log in

Privacy Policy

Add to Collection

No Collections

Here you'll find all collections you've created before.