template_include

過濾鉤子
apply_filters( 'template_include', $template )

template_include – 這個過濾器允許開發者修改用於渲染頁面或文章的模板檔案的路徑。該過濾器被應用於模板檔案的路徑,可以用來載入一個自定義的模板檔案或修改預設模板檔案的路徑。

在包含當前模板之前過濾其路徑。

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

常見問題

FAQs
檢視更多 >