document_title_parts

過濾鉤子
apply_filters( 'document_title_parts', $title )
引數
  • (array) $title { The document title parts. @type string $title Title of the viewed page. @type string $page Optional. Page number if paginated. @type string $tagline Optional. Site description when on home page. @type string $site Optional. Site title when not on home page. }
    Required:
定義位置
相關勾子
document_title_separatordocument_titlewp_title_partspre_get_document_titlethe_title_export
相關方法
wp_get_document_titlecurrent_theme_supportsthe_title_rssget_wp_title_rsscomments_templateget_template_part
引入
4.4.0
棄用
-

document_title_parts: 這個過濾器是用來修改WordPress中文件標題的各個部分。它通常用於修改標題結構或為標題的特定部分新增自定義文字。

過濾檔案標題的部分內容。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$title = apply_filters( 'document_title_parts', $title );
$title = apply_filters( 'document_title_parts', $title );
$title = apply_filters( 'document_title_parts', $title );

常見問題

FAQs
檢視更多 >