如何将我的页面模板放在 Wordpress 子文件夹中? [英] How to have my page templates in sub folder Wordpress?
本文介绍了如何将我的页面模板放在 Wordpress 子文件夹中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是儿童主题.在子主题中,我希望为所有页面模板创建一个子文件夹,例如/templates 中的主页模板、默认模板等.当我为页面选择模板时,我该如何做到这一点,以便 wordpress 管理菜单仍然可以看到它们?
I am using a child theme. In the child theme I would like to have a subfolder for all my page templates, e.g. homepage-template, default-template, etc in /templates. How can I do this so that wordpress admin menu can still see them when I choose a template for a page?
推荐答案
你能升级到 WordPress 3.4 吗?这是 3.4 的原生功能.
Can you upgrade to WordPress 3.4? This is a native function of 3.4.
参见:http://nacin.com/2012/03/29/page-templates-in-subdirectories-new-in-wordpress-3-4/
这篇关于如何将我的页面模板放在 Wordpress 子文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文