[英]Creating a custom page template in WordPress
I'm using the twentyfourteen theme and have created a child theme with its own style.css. 我正在使用二十十四个主题,并使用自己的style.css创建了一个子主题。 Now I'd like to create a custom page template.
现在,我想创建一个自定义页面模板。 From all I've read the process seems to be:
从我已经阅读的所有内容来看,该过程似乎是:
Does that sound right? 听起来对吗?
One question is, How is the new template assigned to the page? 一个问题是,如何将新模板分配给页面? Do I have to manually go into the Page Attributes and select the new template, or will it get pulled automatically from the template hierarchy?
我是否必须手动进入“页面属性”并选择新模板,还是会自动从模板层次结构中提取它?
Thanks for your help. 谢谢你的帮助。
You have to choose in the Page Attributes
section. 您必须在“
Page Attributes
部分中进行选择。 Refer the below URL. 请参考以下URL。 https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/ http://www.smashingmagazine.com/2015/06/wordpress-custom-page-templates/
https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/ http://www.smashingmagazine.com/2015/06/wordpress-custom-page-templates/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.