get_index_template

函式
get_index_template ( No parameters )
返回值
  • (string) Full path to index template file.
相關
  • get_query_template()
定義位置
相關方法
get_single_templateget_date_templateget_home_templateget_page_templateget_template
引入
3.0.0
棄用
-

get_index_template: 這個函式用來檢索當前WordPress主題的索引模板檔案的路徑。索引模板檔案通常用於在主頁上顯示部落格文章。

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

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

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

常見問題

FAQs
檢視更多 >