the_archive_title

函数


the_archive_title ( $before = '', $after = '' )
参数
  • (string)
    $before
    Optional. Content to prepend to the title. Default empty.
    Required:
    Default: (empty)
  • (string)
    $after
    Optional. Content to append to the title. Default empty.
    Required:
    Default: (empty)
相关
  • get_the_archive_title()
定义位置
  • wp-includes/general-template.php
    , line 1678
引入
4.1.0
弃用

显示基于查询对象的档案标题。

function the_archive_title( $before = '', $after = '' ) {
	$title = get_the_archive_title();

	if ( ! empty( $title ) ) {
		echo $before . $title . $after;
	}
}