当前浏览:首页 / WordPress函数 / the_author_link()

the_author_link()

显示作者链接或作者名称

author 作者more...

linkmore...

themore...


描述

如果作者设置了主页,则回显HTML链接,否则只回显作者的名称。



源码

查看源码 官方文档


更新日志

版本描述
2.1.0开始引入

使用示例

  • 示例1

    示例
    将作者的网站URL显示为一个链接,链接的文本是作者的个人资料公开显示的名称。在本例中,作者的显示名为James Smith。

    <p>Written by: 
    <?php the_author_link(); ?></p>
    

    显示为:

    Written by: James Smith