WordPress函数:single_cat_title
一、函数简介
single_cat_title该函数作用是显示或检索类别存档的页面标题。(Displays or retrieves page title for category 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_cat_title( $prefix = '', $display = true ) ?>
四、源代码
/**
* Displays or retrieves page title for category archive.
*
* Useful for category template files for displaying the category 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 0.71
*
* @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_cat_title( $prefix = '', $display = true ) {
return single_term_title( $prefix, $display );
}
THE END