A template is one file instead of a folder. A page that almost always has its own template is the homepage. To make a template, create a new file inside your theme. Avoid using home.php
because WordPress has already set this page up in its functions. Use home-template.php
, homepage.php
, etc.
At the top of your template put this code:
1
2
3
4
5
|
<? /* Template Name: Home */ ?> |
The template name is commented out, but WordPress still pulls the name. In your dashboard, create a new page. On the right side, you will see a dropdown for template name.