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

WordPress获取Tag标题标签:single_tag_title

时间:2024-03-16

WordPress模板标签single_tag_title输出当前标签(Tag)的标题,一般用在标签页。

single_tag_title( string $prefix = '', boolean $display = true )

函数参数

$prefix

字符串值,默认为空

在标题前输出的字符

$display

布尔值,默认值:true

是否输出返回的值,默认为输出。

函数使用示例

<p><?php single_tag_title('当前标签:'); ?></p>

扩展阅读

single_tag_title()函数位于:wp-includes/general-template.php

相关函数:

  • get_tag()

  • get_tag_link()

  • get_tags()

  • get_the_tag_list()

  • get_the_tags()

  • is_tag()

  • the_tags()

  • tag_description()

  • wp_generate_tag_cloud()

  • wp_tag_cloud()


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

Copyright © 2019-2024 wangzhan.shop


Whatsapp
Powered by RRZCMS