How to create page templates

Individual Pages can be set to use a specific custom Page Template (a PHP template file, e.g., custom.php) you create within your Theme. This new Page Template will override the default page.php page template.

WordPress can be configured to use different Page Templates for different Pages. At the page editing screen you can specify the page template in the Page Attributes block.

(click to enlarge)

In order to access the Page Template selector, there must be at least one custom Page Template available in the active theme. If a custom page exists, but you still are not able to see Page Template selector, try to re-activate your current theme.

Creating Your Own Page Templates

The files defining each Page Template could be found in wp-content/themes directory. To create a new Custom Page Template for a Page you must create new .php file. For example let’s name it custom.php

To make it work as a page template the file should start from

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

The file may be named almost anything with a .php extension(see reserved Theme filenames for filenames you should not use; these are special file names WordPress reserves for specific purposes).

The rest of the page template files can contain anything you need, starting from the static content to some markup that will determine your page content

 

Feel free to check the detailed video tutorial below:
How to create page templates