我想要显示一个静态首页和自定义帖子页面。我为此创建了2个页面模板。
page-template-home.php //commented it as Template Name: Home Template)
page-template-blog.php //commented it as Template Name: Blog Template)然后创建了2个wordpress页面主页和博客,然后对于主页,将页面模板设置为主页模板,对于博客页面,将页面模板设置为博客模板。
在设置>阅读中,我设置
Front page: Home
Posts page: Blog现在主页已经很完美了,但是博客页面似乎加载的是index.php而不是page-template-blog.php
我是否遗漏了什么或者做错了什么??
发布于 2010-12-06 00:33:56
您在这里为自己做了一些工作-我会忘记自定义模板,而是使用template hierarchy - front-page.php作为主页(首页),home.php用于博客页面。
您仍然需要您在问题中描述的设置,但是“控制”页面现在独立于呈现它们的模板:)
https://stackoverflow.com/questions/4358918
复制相似问题