O'Reilly logo

WordPress 3 Complete by April Hodge Silver

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 templates within your theme

You've now got a functional basic template for your theme. It works great on the main blog page and successfully loads content for anything you can click on in your site.

However, we want slightly different templates for other types of content on our site. For example, a single post page needs to have a comments form where visitors can post comments; the Page page doesn't need to show the date, category, or tags; and the category page should show the category name.

Before we can create other templates, we need to break up the main index.php file into parts so that these different templates can share the common elements. I've mentioned many times the importance of the header, sidebar, and footer. We're going ...

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