WordPress评论链接标签:comments_link

WordPress模板标签comments_link用于输出评论链接,点击该链接可以跳转到当前文章的评论区域,必须用在The Loop主循环中。

该函数没有参数,直接调用即可。

函数使用示例

<a href="<?php comments_link(); ?>">
    发表评论
</a>

输出的链接如下所示:

https://www.beizigen.com/post/wordpress-classification-archive-next-page-label-next_posts_link/#respond

扩展阅读

comments_link()函数位于:wp-includes/comment-template.php

相关函数:

阿里云