我要投稿 | 网站地图 WordPress建站学习平台
WordPress教程网
热门标签: wordpress教程 wordpress函数 wordpress WordPress建站 wordpress插件

图文教程

当前位置:首页> 图文教程

WordPress函数get_the_author_link()

发布:WordPress教程网   发布时间: 2023-02-03  游览次数:26次

介绍

get_the_author_link() 与 the_author_link() 是相对应的函数,只不过 get_the_author_link() 只是获取,不做输出,要做输出,需要用 echo 进行输出。

get_the_author_link() 是获取文章作者的网站链接,该链接会加在 the_author() 显示的公开名秒文本中。

网站链接来自 仪表盘 -> 用户 -> 我的个人资料 中的“站点”所填写的值。

并且该函数必须使用在 the_loop 中。

使用

<?php get_the_author_link(); ?>

参数

该函数不接受任何参数。

示例

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

将显示“ Written by: admin”,admin会带上上图“站点”的链接。

本文版权归原作者所有,转载请注明原文来源出处, WordPress教程网 感谢您的支持!

本文链接: http://www.wpcn.net/825.html

WordPress教程网
WordPress教程网
相关内容