- Create a new PHP file named
page-yourcustomnamehere.php
. - Add /* Template Name: Your Custom Name */ in the top. This name is what you look for in the editor.
- Add your code (feel free to copy from
page.php
orindex.php
and change it to what you need. - Create your nav menu and add it to
nav.php
- Create a custom menu and add it to
nav-yourcustomnamehere.php
- Add the code in
custom-nav-caller.php
example file to where you want your nav to go insidepage-yourcustomnamehere.php
.
The code looks for a file named nav-{$whatever}.php
, where $whatever
is the slug of your file. If it exists, it'll include that file. If not, it falls back to nav.php
, so it's important that that file exists.