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.