[WordPress] 外掛分享: Template for Custom Post Types

首頁外掛目錄 › Template for Custom Post Types
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
700+
安裝啟用
★★★★
4.3/5 分(6 則評價)
3462 天前
最後更新
問題解決
WordPress 3.0+ v1.0.4 上架:2016-01-29

內容簡介

這個外掛能夠讓你像頁面一樣,將頁面模板指定給任何自訂文章類型或文章。此模板將用於在前端顯示單篇文章。

你可以像 WordPress 頁面一樣創建相同的頁面模板。你需要從外掛的設置頁面中選擇要應用模板的文章類型。

要創建模板文件,你需要在當前佈景主題的目錄中創建 .php 檔案,並在檔案的第一行註解中添加模板名稱:your template name。例如:

你也可以在當前佈景主題資料夾的子目錄中創建模板檔案。現在 WordPress 4.7 已經在核心中引入了這個功能。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「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.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon