Creating Different Page Views Using WordPress Templates

As we explain in Book IV, Chapter 2, a static page contains content that doesn't appear on the blog page, but as a separate page within your site. You can have numerous static pages on your site, and each page can have a different design, based on the template you create. (Flip to Book VI to find out all about choosing and using templates on your site.) You can create several static-page templates and assign them to specific pages within your site by adding code to the top of the static-page templates.

Here's the code that appears at the top of the static-page template Lisa uses for her About Us and Our Blog Designers page at www.ewebscapes.com/about:

<?php
/*
Template Name: About Page
*/
?>

Using a template on a static page is a two-step process: Upload the template, and then tell WordPress to use the template by tweaking the page's code.

image In Book VI, you can discover information about Custom Menus, including how to create different navigation menus for your Web site. You can create a menu of links that includes all the pages you created in your WordPress Dashboard. You can display that menu on your Web site by using the Custom Menus feature.

Uploading the template

To use a page template, you have to create one. You can create this file in a text-editor program, such as Notepad. (To see how to create a template, flip over ...

Get WordPress® All-in-One For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.