What is default template file in WordPress
page.php of your theme is used to show default template page.
Why We Need Custom Page Template
You may need to display contents in different layouts and styles. Like I want a page template that has no sidebar. And for this we need different custom page template.
How To Create a Custom Page Template
- Let's create a new page template named Tutorial.
- Create a copy of page.php file of your theme and rename it as tutorial-template.php
- Open tutorial-template.php in any text editor. Add following codes at the top of page.
- Edit code of tutorial-template.php as per your requirements.
<?php /* Template Name: Tutorial */ ?>
Similarly you can create many custom page template files.