首页 视频课程 主题开发课程第04章、常用函数 WordPress主题插件开发中作者相关函数

WordPress主题插件开发中作者相关函数

2023-06-11 / 395阅

获取作者ID

获取当前文章或页面的作者ID:

$author_id = get_the_author_meta('ID'); 

获取作者昵称

获取当前文章或页面的作者昵称:

$author_nickname = get_the_author_meta('nickname'); 

获取作者邮箱

获取当前文章或页面的作者邮箱:

$author_email = get_the_author_meta('email'); 

获取作者描述

获取当前文章或页面的作者描述:

$author_description = get_the_author_meta('description'); 

获取作者网站

获取当前文章或页面的作者网站:

$author_website = get_the_author_meta('url'); 

获取作者头像

获取当前文章或页面的作者头像:

$author_avatar = get_avatar(get_the_author_meta('user_email'), 100); 

阅读文章或者观看视频过程中有任何问题,请下方留言或者联系我Q248758228

大家谈论
    我的见解
    目录