Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

WordPress Customization

By Justin Laing
2008-01-09


Page Templates

Page templates are used to format specific pages. For example if you want your About page to have a specific template you can assign it a page template. Posts can not have templates, only pages (under Write -> Write Page). To start a new page create a new php file, for example we could call our new file about_us.php. In the file put this code at the top:
<?php

/*

Template Name: About
Us


*/

?>
WordPress will see this file as a page template and will display it in the list of page templates you choose from when you are editing a page. To create a page in the admin interface go to Write -> Write Page. Then on the right side bar you can pick a custom page template. Pick your new “About Us” template.

Choose Page Template

You probably want a number of standard template elements on your custom page template. Here’s a good framework to start you template with:

Page Template Code

The loop on your page template will by default grab the content your write for your page in the admin interface.



Tutorial Pages:
» Introduction To WordPress
» WordPress Themes
» Structure Of A WordPress Theme
» Making Your New Theme
» Modifying The Header
» Blog / Post Templates
» The Post Loop
» Page Templates
» Sidebars
» Meta Data / Custom Fields For Page Customization


Originally posted on Makebeta


 | Bookmark
Related Tutorials:
» Drupal CMS e-Commerce Module Basics
» Creating an Online Newsletter with Drupal
» Setting Up Subversion for Development on Windows
» Stylize Your Digg Count
» Installing Apache on Windows
» Ecommerce Imagery: Persuading with Pictures