O'Reilly logo

WordPress® All-in-One For Dummies® by Michael Torbert, Andrea Rennick, Kevin Palmer, Cory Miller, Lisa Sabin-Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required