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()
定義位置
相關方法
get_the_archive_titlepost_type_archive_titlethe_archive_descriptionthe_titleget_archive_template
引入
4.1.0
棄用
-

the_archive_title: 此函式顯示當前存檔的標題。

顯示基於查詢物件的檔案標題。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function the_archive_title( $before = '', $after = '' ) {
$title = get_the_archive_title();
if ( ! empty( $title ) ) {
echo $before . $title . $after;
}
}
function the_archive_title( $before = '', $after = '' ) { $title = get_the_archive_title(); if ( ! empty( $title ) ) { echo $before . $title . $after; } }
function the_archive_title( $before = '', $after = '' ) {
	$title = get_the_archive_title();

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

常見問題

FAQs
檢視更多 >