WordPress函数:single_tag_title

一、函数简介

single_tag_title该函数的作用是显示或检索标签帖子存档的页面标题。(Displays or retrieves page title for tag post archive.)  

二、函数参数

* @param string $prefix Optional. What to display before the title. * @param bool $display Optional. Whether to display or retrieve title. Default true. * @return string|void Title when retrieving.  

三、函数案例

(一)、案例1
<?php echo single_tag_title( $prefix = '', $display = true ) ?>
   

四、源代码

/**
 * Displays or retrieves page title for tag post archive.
 *
 * Useful for tag template files for displaying the tag page title. The prefix
 * does not automatically place a space between the prefix, so if there should
 * be a space, the parameter value will need to have it at the end.
 *
 * @since 2.3.0
 *
 * @param string $prefix  Optional. What to display before the title.
 * @param bool   $display Optional. Whether to display or retrieve title. Default true.
 * @return string|void Title when retrieving.
 */
function single_tag_title( $prefix = '', $display = true ) {
	return single_term_title( $prefix, $display );
}
     
THE END