教程解读:
我们在做wordpress网站的时候常常需要调用用户头像
常用调用代码为:
<?php echo get_avatar( get_the_author_email(), '60' );?>
可以通过邮件调用 avatar 头像
如果有自定义头像的话我们可以用下面代码:
<?php global $current_user;get_currentuserinfo();echo get_avatar( $current_user->user_email, 32); ?>
教程结语:
这就是wordpress 用户头像在线调用代码方法,不懂请留言。
本文章已结束,如转载请注明:汇站网 » wordpress 用户头像在线调用代码