Php Wordpress-自定义博客页面
我想显示一个静态的首页和自定义的帖子页面。我为此创建了两个页面模板Php Wordpress-自定义博客页面,php,wordpress,Php,Wordpress,我想显示一个静态的首页和自定义的帖子页面。我为此创建了两个页面模板 page-template-home.php //commented it as Template Name: Home Template) page-template-blog.php //commented it as Template Name: Blog Template) 然后创建2个wordpress主页和博客页面,然后对于主页,将页面模板设置为主页模板,对于博客页面,将页面模板设置为博客模板 从设置>阅读我设置
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
任何我遗漏或做错的事情???你在这里为自己做了一些工作-我会忘记自定义模板,而是使用-
首页.php
作为主页(首页),使用主页.php
作为博客页面
您仍然需要按照问题中所述进行设置,但“控件”页面现在独立于呈现它们的模板:)考虑将其移动到?