內容簡介
這個外掛能夠讓你像頁面一樣,將頁面模板指定給任何自訂文章類型或文章。此模板將用於在前端顯示單篇文章。
你可以像 WordPress 頁面一樣創建相同的頁面模板。你需要從外掛的設置頁面中選擇要應用模板的文章類型。
要創建模板文件,你需要在當前佈景主題的目錄中創建 .php 檔案,並在檔案的第一行註解中添加模板名稱:your template name。例如:
你也可以在當前佈景主題資料夾的子目錄中創建模板檔案。現在 WordPress 4.7 已經在核心中引入了這個功能。
外掛標籤
開發者團隊
② 後台搜尋「Template for Custom Post Types」→ 直接安裝(推薦)
原文外掛簡介
This plugin will allow you to assign page template to any custom post type or posts same as Page. The template will be used to display single post in front end.
You can create template same as page template for wordpress pages. You need to select post types where you want to apply template from settings page of this plugin from admin side.
To create template file you need to create .php file in current theme’s directory with Template Name: your template name in comment at first line of your file. Ex.
You can create template files in subdirectory of current theme folder also. Now WordPress 4.7 has introduced this functionality in core.
