Info

Figure 3.59. The Hello theme home page presents more like a magazine than a website

The Standard Page Template

The standard or default page template is the layout that's used for the theme's page content, such as an About page. Most themes treat the default page template conservatively, since the content itself is fairly static and any special styling might be distracting. The traditional page template includes the same header, sidebar, and footer that's seen on the home page.

The Aspire theme and the Concept theme, shown in Figure 3.60 and Figure 3.61 respectively, both showcase well-designed page templates. The main elements are all addressed: a uniform header, sidebar, footer (not shown), and page content area. Notice the particular care given to the appearance of subheadings, images, lists, and the like. Publishers are able to use these elements easily within their pages, making them fit seamlessly with the rest of their site.

Figure 3.60. Smart design in the Aspire theme's standard page template
Figure 3.61. The Concept theme's default page template

The Single Post Template

The single post template is used to display an individual blog post in its entirety. Where a page template typically only displays the page content, the single post template will usually show a lot of the metadata associated with the post, such as tags, categories, trackbacks (a type of linkback), comments, and the like.

Remember that while The Loop will often only display an excerpt from the post on your list pages, the single post template will display it in full. Some of the customizations you can implement may take the form of custom post images, separately styled pull-quotes, lists of related articles, and unique templates for different types or categories of posts. Let's take a look at a complete blog post template in Figure 3.62. This example of a single post template comes from the Spectrum theme by WooThemes.6

Figure 3.62. Just one example from the spectrum of single post themes available

6 http://woothemes.com

The Archive, Author, Category, and Tag Page Templates

WordPress uses these templates to display lists of posts that are filtered on some criterion; this can be a category, tag, author, or date. As you'll see in the section called "Quick-and-dirty Template Hierarchy Reference" in Chapter 5, if your theme lacks a category, author, or tag template, the standard date-based archive template will be used to display those pages. This is often sufficient, as the needs of all those page types are very similar. However, you may wish to give one or more of these templates a specific style, and WordPress gives you the flexibility to do that.

These templates are very flexible, and there are a number of ways you can use them to present the posts. Figure 3.63 shows one possibility, from the SitePoint blogs.

Figure 3.63. The category archive on the SitePoint blogs displays excerpts of each post

The Search Results Page

This template handles the task of delivering results for search queries entered by the user. And don't worry: there's no requirement for you to know anything about search algorithms—WordPress does the hard work for you! All you have to decide on is how to display the results. The design for this page is likely to be similar to the archive template—after all, you're displaying a list of posts—but you also need to account for any other form of content that might be returned, like authors, categories, or pages.

It's worthwhile considering customizations that make the search page more helpful to users by showing additional content that might be relevant to a search query. For instance, let's check out the search results page from the ThemeShaper site in Figure 3.64. Note that the sidebar contains a bunch of suggested posts, in case the searcher failed to find what they were looking for.

Figure 3.64. ThemeShaper's search results page

The 404 Page

WordPress provides built-in handling of "page not found" (404) errors. Rather than just sending users back to where they came from, an effective 404 page will help users by including a search form to find the content they seek, and suggesting how to report the problem if they arrived via an internal link. You might also consider using this page to display popular content from the rest of the site—after all, there's no reason for them to leave the site right away!

Figure 3.65 and Figure 3.66 show some cleverly designed 404 error pages.

Figure 3.65 and Figure 3.66 show some cleverly designed 404 error pages.

This means you followed a bad link! This page has moved, or was never here to start with!

Check the URL for typing errors or use the sitemap in the footer to find the page you are looking for.

If all else falls, you can always head back Home and start over.

Looking for something? Try searching... Googl e" Custom Search

Figure 3.65. The 404 error page from WooThemes

Was this article helpful?

0 0

Post a comment