您的当前位置:首页 > 知识博客 > wordpress建站

WordPress输出文章评论Feed超链接函数:post_comments_feed_link

时间:2024-03-12


WordPress函数post_comments_feed_link输出指定文章评论的Feed超链接,如果不指定文章ID,则获取当前文章的评论Feed链接。

post_comments_feed_link( string $link_text = '', int $post_id = '', string $feed = '' )

函数参数

$link_text

字符串,默认值:评论Feed

链接的锚文本

$post_id

整数

文章ID,如果不指定,则输出当前文章的评论链接。

$feed

字符串

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

函数返回值

<a href="https://www.tiezhushuo.com/3775.html/feed">评论Feed</a>

函数使用示例

<?php post_comments_feed_link();?>

扩展阅读

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

相关函数:

  • get_post_comments_feed_link()

  • post_comments_feed_link_html()

  • comments_rss_link()


欢迎咨询/Welcome to inquire
tel/vx:18842938855
qq:1685522781
email:1685522781@qq.com

Copyright © 2019-2024 wangzhan.shop


Whatsapp
Powered by RRZCMS