WordPress函数:the_archive_title
一、函数简介
根据查询的对象显示存档标题。(Displays the archive title based on the queried object.)二、函数参数
* @param string $before Optional. Content to prepend to the title. Default empty. * @param string $after Optional. Content to append to the title. Default empty.三、函数案例
<?php the_archive_title( $before = '', $after = '' ) ?>
四、源代码
/**
* Displays the archive title based on the queried object.
*
* @since 4.1.0
*
* @see get_the_archive_title()
*
* @param string $before Optional. Content to prepend to the title. Default empty.
* @param string $after Optional. Content to append to the title. Default empty.
*/
function the_archive_title( $before = '', $after = '' ) {
$title = get_the_archive_title();
if ( ! empty( $title ) ) {
echo $before . $title . $after;
}
}
THE END