admin管理员组

文章数量:1022804

I recently learned about the differences between home.php, front-page.php, and index.php. I rightly created a front-page.php to handle the Landing page, a home.php to handle the blog (posts list) and an index.php to manage the other paths.

So far, the front-page.php is handling the landing page and I expect the home.php to handle the /blog path. But when I go to the /blog path, it uses the 404.php template and tells me "page not found".

I learned I could make the /blog path work by creating a static page called blog and assign the post page to show the blog page (settings >> reading), but I think this is too crude and do users need to do this themselves?

So I'm confused at the moment and would need your help.

How can I make my /blog path work?

Thanks for your answer in advance.

I recently learned about the differences between home.php, front-page.php, and index.php. I rightly created a front-page.php to handle the Landing page, a home.php to handle the blog (posts list) and an index.php to manage the other paths.

So far, the front-page.php is handling the landing page and I expect the home.php to handle the /blog path. But when I go to the /blog path, it uses the 404.php template and tells me "page not found".

I learned I could make the /blog path work by creating a static page called blog and assign the post page to show the blog page (settings >> reading), but I think this is too crude and do users need to do this themselves?

So I'm confused at the moment and would need your help.

How can I make my /blog path work?

Thanks for your answer in advance.

Share Improve this question edited Apr 25, 2019 at 9:01 Victor Ofoegbu asked Apr 25, 2019 at 8:49 Victor OfoegbuVictor Ofoegbu 1115 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

That's exactly what you need to do. The home.php file is used if you're using the main page of your site to display posts or if you have created a separate static page - your Blog page in this case. Perhaps you find it crude but it's perfectly normal to do this.

If you don't change the reading settings, the main page of your site will show your list of posts (more of a traditional blog).

Have a look at the Template Hierarchy documentation as this goes into more detail - specifically the Home Page display.

I recently learned about the differences between home.php, front-page.php, and index.php. I rightly created a front-page.php to handle the Landing page, a home.php to handle the blog (posts list) and an index.php to manage the other paths.

So far, the front-page.php is handling the landing page and I expect the home.php to handle the /blog path. But when I go to the /blog path, it uses the 404.php template and tells me "page not found".

I learned I could make the /blog path work by creating a static page called blog and assign the post page to show the blog page (settings >> reading), but I think this is too crude and do users need to do this themselves?

So I'm confused at the moment and would need your help.

How can I make my /blog path work?

Thanks for your answer in advance.

I recently learned about the differences between home.php, front-page.php, and index.php. I rightly created a front-page.php to handle the Landing page, a home.php to handle the blog (posts list) and an index.php to manage the other paths.

So far, the front-page.php is handling the landing page and I expect the home.php to handle the /blog path. But when I go to the /blog path, it uses the 404.php template and tells me "page not found".

I learned I could make the /blog path work by creating a static page called blog and assign the post page to show the blog page (settings >> reading), but I think this is too crude and do users need to do this themselves?

So I'm confused at the moment and would need your help.

How can I make my /blog path work?

Thanks for your answer in advance.

Share Improve this question edited Apr 25, 2019 at 9:01 Victor Ofoegbu asked Apr 25, 2019 at 8:49 Victor OfoegbuVictor Ofoegbu 1115 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

That's exactly what you need to do. The home.php file is used if you're using the main page of your site to display posts or if you have created a separate static page - your Blog page in this case. Perhaps you find it crude but it's perfectly normal to do this.

If you don't change the reading settings, the main page of your site will show your list of posts (more of a traditional blog).

Have a look at the Template Hierarchy documentation as this goes into more detail - specifically the Home Page display.

本文标签: Where can I find my blog page