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:
- I created a file, page.php, with the standard blog page code and gave it a template name.
- I set the Blog page on wordpress to use the Blog template.
- All other pages (i.e. home, about us, etc.) are set to use default page template (which should be index.php right?)
- I set the Reading settings to Front Page: Home and Posts Page: Blog
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.phpshould really be your blog template not your static home page. Make a copy ofpage.phptopage-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.phpis used for all static pages,index.phpis used for whatever you've assigned as your blog page in the "Reading" section of the dashboard.index.phpis also the template of last resort, which will be used if WordPress can't find any other appropriate template files.