WordPress获取作者Feed链接函数:get_author_feed_link

本站正在使用的主机

本站目前托管于腾讯云香港轻量服务器,价格便宜访问速度也快,使用本站推荐链接购买还可免费获得WordPress运行环境优化服务。

最新活动 »

WordPress函数get_author_feed_link返回指定作者的Feed链接。

get_author_feed_link( int $author_id, string $feed = '' )

函数参数

$author_id

整数

作者的ID

$feed

字符串

Feed的类型,可用值:rss2、atom,默认值为get_default_feed()函数返回的值,即rss2

函数使用示例

<a href="<?php echo get_author_feed_link(1); ?>">订阅<?php echo get_the_author_meta('display_name', 1); ?></a>

扩展阅读

get_author_feed_link()函数位于:wp-includes/link-template.php

相关函数:

  • author_feed_link()
  • get_author_rss_link()
背字根微信二维码

本站文章均为原创,码字非常不容易,转载请注明原文出处,给苦逼的作者保留一点创作动力。