get_404_template

函式
get_404_template ( No parameters )
返回值
  • (string) Full path to 404 template file.
相關
  • get_query_template()
定義位置
相關方法
get_templateget_tag_templateget_page_templateget_date_templateget_home_template
引入
1.5.0
棄用
-

get_404_template: 這個函式用來獲取404模板檔案的路徑,當一個頁面或文章無法找到時,就會使用這個檔案。

檢索當前或父模板中404模板的路徑。

模板層次和模板路徑可通過{@see ‘$type_template_hierarchy’}和{@see ‘$type_template’}動態鉤子過濾,其中`$type`為’404’。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function get_404_template() {
return get_query_template( '404' );
}
function get_404_template() { return get_query_template( '404' ); }
function get_404_template() {
	return get_query_template( '404' );
}

常見問題

FAQs
檢視更多 >