0

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.

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.

  • Thanks a lot for the very useful answer. I've done most of what you advise above, so here's where I am now... I have the home.php file and have set the homepage displays to the latest post option. I expect everything to work, but when I go to /blog path of my site, it is handled by the 404.php template. – Vick_onrails Apr 25 at 8:27
  • Hm, sounds like some sort of rewrite error of your .htaccess. Try flushing your rewrite rules by visiting setttings >> permalinks (triggers the flush). Backup your .htaccess and upload an original one from a fresh installtion. PM me with access so I can have a look and I'll see what I can do. – user3135691 Apr 25 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.