single_tag_title()获取当前标签页面的标题

目录

描述

Displays or returns the tag title for the current archive page.

single_tag_title() 描述

用法

 <?php single_tag_title$prefix$display ); ?> 

Default Usage

 <?php single_tag_title(); ?> 

single_tag_title() 用法

参数

$prefix

(string) (可选) Text to output before the title.

默认值: None

Note: The $prefix argument is currently ignored if the $display argument is false.
See http://core.trac.wordpress.org/ticket/16632

$display

(boolean) (可选) Display the title (TRUE), or return the title to be used in PHP (FALSE).

默认值: TRUE

single_tag_title() 参数

示例

This example displays the text "Currently browsing " followed by the tag title.

Currently browsing WordPress.

This example assigns the current tag title to the variable $current_tag for use in PHP.

single_tag_title() 示例

历史

single_tag_title() 历史

源文件

single_tag_title() 函数的代码位于 wp-includes/general-template.php.

single_tag_title() 源文件

相关