WordPress评论作者标签:comment_author
WordPress模板标签comment_author用于在评论模板中输出当前评论的作者,通常在自定义输出评论列表中使用。 comment_author( integer $comment_ID = 0 ) 函数参数$comment_ID 整数型,默认值:0 指定评论ID,则输出该评论的作者名称。 …
WordPress模板标签comment_author用于在评论模板中输出当前评论的作者,通常在自定义输出评论列表中使用。 comment_author( integer $comment_ID = 0 ) 函数参数$comment_ID 整数型,默认值:0 指定评论ID,则输出该评论的作者名称。 …
WordPress模板标签comment_id_fields用于在评论表单生成两个隐藏的域,保存当前文章ID和父评论的ID。 comment_id_fields( integer $id = 0 ) 函数参数$id 整数型,默认值:0 提供一个评论ID,隐藏域将基于这条评论来生成。 …
WordPress模板标签comment_ID用于输出当前评论的ID,通常用在自定义评论模板。 comment_ID() comment_ID()函数没有参数,直接调用即可。 函数使用示例<p>这条评论的ID是:<?php comment_ID(); ?></p> 扩展阅读comment_ID()函数位于:wp-includes/comment-template.php …
WordPress模板标签comments_popup_link用于输出弹出评论的链接,当使用了comments_popup_script()函数时,点击该链接可实现弹出窗口评论,如果没有使用comments_popup_script()函数,则输出普通的跳转到评论区域的链接。 由于comments_popup_script()函数在WordPress 4.5版本已弃用,所以comments_popup_link()也变得没有意义。 …
WordPress模板标签comments_popup_script用于输出支持弹出评论的JS脚本,可以使comments_popup_link()输出的链接实现弹出窗口中评论,通常在<head>标签之内使用。 …
WordPress模板标签comments_rss_link用于输出当前文章评论的RSS链接,不同于comments_link(),comments_rss_link()输出的是一个完整的链接,而不只是一个URL。 comments_rss_link( string $link_text = 'Comments RSS' ) 函数参数$link_text 字符串值,默认值:Comments RSS 提供一个文本,用于链接的锚文本。 …
WordPress模板标签comments_link用于输出评论链接,点击该链接可以跳转到当前文章的评论区域,必须用在The Loop主循环中。 该函数没有参数,直接调用即可。 函数使用示例<a href="<?php comments_link(); ?>"> 发表评论 </a> 输出的链接如下所示: …
WordPress模板标签comments_number用于输出当前文章的评论数量,必须用在The Loop主循环中。 comments_number( string $zero = false, string $one = false, string $more = false ) 函数参数$zero 字符串值,默认值:No Comments 如果该文章没有评论,则显示$zero的值。 …
WordPress模板标签the_meta用于输出文章自定义字段,必须用在The Loop主循环中。 the_meta() 该函数没有参数,以无序列表的方式输出文章自定义字段。 函数使用示例<?php the_meta(); ?> 以上代码输出类似如下的内容: …
WordPress模板标签the_tags用于在文章页输出标签链接,必须用在The Loop主循环中。 the_tags( string $before = null, string $sep = ', ', string $after = '' ) 函数参数$before 字符串值,默认值:null 在标签链接前显示的文本。 …