最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Where can I find my blog page?

programmeradmin1浏览0评论

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.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论