0

Firstly, I understand the template hierarchy a little bit and read all the answers given by experts but unfortunately didn't get that.

Here is the problem I face:

  1. If I use home.php then the content of the file is used on the home-page but when I set the static page for blog posts then the content of home.php is showed on the page. (I know the template hierarchy).
  2. If I use front-page.php then the content of index.php is used on the homepage and not the file content.

Now I am confused why the home.php works on the home page and front-page.php isn't shown.

Any idea why this isn't working.

  • What does “is set the static page for blog posts” mean? – Jacob Peattie Sep 4 at 7:10
  • sorry for typo error, it is "I" instead of "is" – Raashid Din Sep 4 at 9:27
  • That wasn’t my question. Do you mean you set the front page as the latest posts? – Jacob Peattie Sep 4 at 9:32
  • No. I wanna use a custom-designed homepage, so I have to use front-page.php as a template? Right. If I use home.php then the content is shown inside the static page which I set as a blog posts page which lists posts. But if use file name front-page.php instead of home.php nothing is shown in the homepage just the loop of index.php – Raashid Din Sep 4 at 9:35
  • I wanna know why front-page.php isn't working for the homepage but home.php works – Raashid Din Sep 4 at 9:37

Your Answer

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

Browse other questions tagged or ask your own question.