the_title

過濾鉤子
apply_filters( 'the_title', $page->post_title, $page->ID )
定義位置
  • wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-page.php , line 137
相關勾子
the_title_rssthe_timethe_sitesthe_title_exportwp_title
相關方法
the_titlethe_title_rssthe_timeget_the_titlethe_datewp_title
引入
n/a
棄用
-

the_title – 這是一個WordPress模板標籤,顯示一個文章、頁面或自定義文章型別的標題。它通常在WordPress迴圈中使用,以顯示正在處理的當前文章的標題。標題顯示為純文字字串,沒有任何HTML格式化。

這個過濾器在wp-includes/post-template.php中有記錄。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
apply_filters( 'the_title', $page->post_title, $page->ID ),
apply_filters( 'the_title', $page->post_title, $page->ID ),
apply_filters( 'the_title', $page->post_title, $page->ID ),

常見問題

FAQs
檢視更多 >