Did you know that you can create different page templates,and use it on your theme? Here’s a simple how-to about WordPress page templates, to get the most out of your theme!
Did you know that you can create different page templates,and use it on your theme? Here’s a simple how-to about WordPress page templates, to get the most out of your theme!
Page templates are very useful: They allow you to creates custom pages, for exemple creating an archive page which will list all your posts, or a page to display infos about the author.
A page template is defined by the following code, inserted on the firsts lines of the file:
<?php /* Template Name: Archives */ ?>
Here, we just created a page template, named "Archives".
To use it on your theme, write a page, and scroll down until you see a "Page Template" dropdown list, as described in the picture below:

Then you just have to choose which page template to use, and save the page.
43 Responses
I don´t understand, how can I do to create a page template? Exactly, where do I put this code? where is “on the firsts lines of the file”?
thank you
@Pablo: Create a blank file and add the code I shown in the article that way:
<?php
/*
Template Name: Archives
*/
?>
//Then start coding the page
Hope it is clearer now!
i allready have a page with the name “Archives”?
what i have to do?
and i cand fine the “Page Templates” in my admin Area?>
please help me
i found this is a quite nice post~
why not post more about create new template with respective posts display?
thanks for this post! it helps me a lot!
Trackbacks: