WordPress Creating a custom template Creating basic blank template


Example

To create a custom template we first need to create php file in a theme directory. You can name it almost any way you want. For this example we will create example.php

One and only thing we need to define inside our example.php, to be recognized by WordPress as a template, is template name. We do that buy putting special comment at the top of a file, like this:

<?php
/*
Template Name: Example
*/
?>

And now when we should see our template listed in Template dropdown in Page Attributes Box

WordPress Dashboard Add New Page section screenshot