admin管理员组文章数量:1430050
I've been learning WordPress for about 2 weeks now and I've got stuck in the "front-page.php", "index.php" and "front-page.php" controversy. Here's my question..
How can I make the /blog use the home.php template? At the moment, it is taken as a 404 page and triggers the 404.php template.
After a few looking up, I discovered I could manually create a blog page with just a title, but I don't know how feasible this is. Please help out.
I've been learning WordPress for about 2 weeks now and I've got stuck in the "front-page.php", "index.php" and "front-page.php" controversy. Here's my question..
How can I make the /blog use the home.php template? At the moment, it is taken as a 404 page and triggers the 404.php template.
After a few looking up, I discovered I could manually create a blog page with just a title, but I don't know how feasible this is. Please help out.
Share Improve this question asked Apr 24, 2019 at 18:07 Victor OfoegbuVictor Ofoegbu 1115 bronze badges1 Answer
Reset to default 0Set front page as static page
The link above describes the other way around (static front page). However, I hope it will help you to understand the mechanism, it's pretty easy.
In your case, you need to create a home.php file in your theme folder, and then go to settings >> read >> and instead of setting "start (front-page.php)" as your start page, set the reading option to "Show last blog posts".
WordPress will use that home.php file then and show your last posts as a front page. I highly recommend installing "What the file" which will show which template you are using. (see the link I've posted)
So, front-page.php will be static front page (if set under settings > read). The file home.php will show blogposts (if set under settings > read).
Clear? I hope that helps.
Please accept the answer as correct if I could help. Thanks.
本文标签: templatesHow to configure my blog page
版权声明:本文标题:templates - How to configure my blog page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745556360a2663210.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论