header_image

函式
header_image ( No parameters )

header_image – 這是一個WordPress函式,用於檢索當前主題的自定義頭像的URL。頭像是一個大的影象,通常顯示在網站的頂部,在主要內容區的上方。header_image函式可以用來在一個自定義的位置顯示頭像,或者檢查當前主題是否有一個自定義的頭像。

顯示標題圖片URL。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function header_image() {
$image = get_header_image();
if ( $image ) {
echo esc_url( $image );
}
}
function header_image() { $image = get_header_image(); if ( $image ) { echo esc_url( $image ); } }
function header_image() {
	$image = get_header_image();

	if ( $image ) {
		echo esc_url( $image );
	}
}

常見問題

FAQs
檢視更多 >