I am creating my first WordPress theme with a one-page parallax scrolling style. I have created my entire website (statically) in the index.php file. It works fine if I set the Admin->Reading setting to 'Your Latest Posts'.
But now I am trying to create a separate page for the blog so I did the following:
All I get is the blog page template for all pages (as if it were the default page template).
How to set up a website like this?
index.php
should really be your blog template not your static home page. Make a copy of page.php
to page-home.php
(or whatever you've named your front page), then put the static content in there. You probably won't even need to assign the template to the page - WordPress will do that automatically based on the file name.
By default, page.php
is used for all static pages, index.php
is used for whatever you've assigned as your blog page in the "Reading" section of the dashboard. index.php
is also the template of last resort, which will be used if WordPress can't find any other appropriate template files.