How to: Create and use WordPress page templates
Posted on | 十一月 27, 2009 | 1 Comment
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
相关文章:
- create-an-options-page-for-your-WordPress-theme
- How to: Display any rss feed on your WordPress blog【Z】
- 7 Must Have WordPress Plugins For Every Blog
- WordPress 永久链接以及在各种平台上的实现方法
- xampp
评论|Comments
One Response to “How to: Create and use WordPress page templates”
留言|Leave a Reply
![如果您自认为是一位忠实的Silverlight-Fans,那么请将此标志放到您的博客中成为一名真正的[银光使者]](http://images.cnblogs.com/cnblogs_com/alamiye010/Silverlighter1.jpg)
十一月 27th, 2009 @ 12:07
[...] the original: How to: Create and use WordPress page templates Related [...]