首页 > WordPress > WordPress如何在文章页面调用作者信息 用户资料如何展现

WordPress如何在文章页面调用作者信息 用户资料如何展现

时间:2022年6月15日 分类:WordPress 浏览量:385

在WordPress中,可以灵活调用文章作者信息,比如展现在所发布的文章页面,作者邮箱、作者姓名、描述等信息。

<?php the_author(); ?> 显示文章的作者
<?php the_author_description(); ?> 显示文章作者的描述
<?php the_author_login(); ?> 显示文章作者的登录名
<?php the_author_firstname(); ?> 显示文章作者的firstname(名)
<?php the_author_lastname(); ?> 显示文章作者的lastname(姓)
<?php the_author_nickname(); ?> 显示文章作者的昵称
<?php the_author_ID(); ?> 显示文章作者的ID号
<?php the_author_email(); ?> 显示文章作者的电子邮箱
<?php the_author_url(); ?> 显示文章作者的网站地址
<?php the_author_link (); ?> 显示一个以文章作者名为链接名
<?php the_author_icq(); ?> (不推荐使用) 显示文章作者的icq
<?php the_author_aim(); ?> 显示文章作者的aim
<?php the_author_yim(); ?> 显示文章作者的yim
<?php the_author_msn(); ?> (不推荐使用) 显示文章作者的msn
<?php the_author_posts(); ?> 显示文章作者已发表文章的篇数
<?php the_author_posts_link(); ?> 显示文章作者已发表文章列表的链接
<?php list_authors(); ?> (不推荐使用) 显示blog所有作者相关信息

如此,我们就可以在文章页面调用作者信息了。如果需要展示用户的自定义信息,可以参考之前这篇:WordPress网站用户自定义资料添加

觉得文章有用就打赏一下文章作者

微信扫一扫打赏

标签: