
內容簡介
WordPress 允許用戶自定義網頁模板,但卻不允許這麼做於博客文章。來自 IndiaNIC 的 Post Template 外掛可讓您也可以使用自定義的頁面模板於博客文章。
安裝 Post Template 外掛後,它會出現在您網頁的側邊欄。您可以從下拉式按鈕中選擇您想要的模板,然後就可以使用該模板來瀏覽您的文章。
如果您想了解如何創建自己的頁面模板,那麼您可以查看此連結 How to Create Page Templates
訪問我們的網站
開發人員
如果您想在自訂的文章類型中實現自定義文章模板,你可以使用 cpt_post_types 過濾器,以下是一個示例,向電影和演員自訂的文章類型添加自定義文章模板選擇器和元框。此代碼可以添加到插件或主題中的 functions.php 文件中。
外掛標籤
開發者團隊
原文外掛簡介
WordPress allows users to customize templates for webpages but, it is not so for blog posts. Post Template plug-in from IndiaNIC enables you to use the customized page templates for your blog posts also.
As soon as you install the Post Template plug-in, it appears on the sidebar of your page. You can choose your desired template from the drop-down button and then you can view your posts in that template.
If you want to know more about how to create your own page templates, then you can visit the link How to Create Page Templates
Visit Our Website
Developers
If you want to implement the custom post templates on a custom post type, you can use the cpt_post_types filter, here’s an example below of adding the custom post template selector and metabox to the Movie and Actor custom post types. This code can be added to a plugin or to the functions.php file in your theme.
