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 badges
Add a comment  | 

1 Answer 1

Reset to default 0

Set 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