How to Create Page Templates

Normally I will use page templates to display the archives which will list all posts on my blog, anyway you can use page templates to get specialized results apart from the basic static page template.

What you need to do is to add the following code to the first line of your php files, you can change the template name as you wish.

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

So now, you have to create a page template named Archives. Then, create a new page, find Template drop down box (refer picture) and choose Archives, this is a page template named Archives that you have created just now.

Leave a Reply