Understanding the Pages of a WordPress Site

With a degree in computer information systems from Mohawk Valley Community College, John worked for small businesses and performed freelance work before joining Site-Seeker in 2007.

One of the things that causes confusion about WordPress is the different type of pages and what can be done with them. The problem is that it’s not an easy thing for non-developers or people that are not extremely familiar with WordPress to grasp completely.

However, I think this is something that’s important for anyone that works with WordPress in any capacity to appreciate. Whether you’re designing a site that’ll be built in WordPress, managing content on a WordPress site or even thinking about using it for a CMS, it’s extremely important to understand the different types of pages, what can be on them and how they work “out of the box” as well as what can be easily modified and what will need more custom work to achieve.

Why Are There Different Types of Pages?

The pages you see when you visit a WordPress site are based on the site’s theme. A theme contains template files for each type of page to be displayed. These template files in turn are each designed to deal with a specific type of WordPress object. So the first step in understanding the different types of pages produced by these templates is understanding the different types of WordPress objects that they display.

WordPress Objects

There are three major WordPress objects that you need to understand in order to understand the pages that can be created on a WordPress site. These objects are:

  1. Post Types
  2. Taxonomies and Terms
  3. Posts

Post Types

The “Post Type” is the major division of data (content) on a WordPress site. Each post type can have different types of data associated with it and can have its own set of templates for displaying that data. In the default installation of WordPress there are several post types. These include some that are easy to recognize as well as some that are not as easily identified. Some of these you may already know while not everyone knows that the others are actually considered their own “Post Type”. The post types of a default installation of WordPress include:

  • Post
  • Page
  • Attachment
  • Revision
  • Menu

For the purposes of this discussion I’m only going to concentrate on post and page. The other three types do not (usually) have front-end pages that are associated with them. Well, actually, attachments can have pages associated with them but as a general rule for SEO reasons you should never actually use these pages or allow them to be shown on your site, so I’m going to ignore them as well.

A post type holds a collection of individual posts. Wording is one of those things that can confuse people. Every item in WordPress is called “Post” no matter what “Post Type” it is part of, and at the same time they use the same term to mean different things, like blog posts. You have to remember that WordPress started out as a blog and all of the terminology associated with it revolves around this beginning. You have to keep in mind the context of where you’re using it. For our purposes a “Post” is any single item of any “Post Type”.

Taxonomies and Terms

Taxonomy is one of the more difficult terms to understand, or at least I get that impression when trying to explain it. Some people think of a taxonomy as a category, but it is more than that. A taxonomy is more precisely a group of categories and WordPress calls these categories “Terms”. Think of a taxonomy as a specific way that posts can be divided and each taxonomy can then be divided again into terms and these terms are what we use to divide our posts.

WordPress has some built in taxonomies for the built in “Post” post type. These built in taxonomies are “Category” and “Tag”. This makes it possible for you to specify the terms created in these taxonomies when creating your blog posts.

Let’s look at an example. Let’s say that we wanted a new post type and we were going to call it “Product”. This new post type will hold all of our product posts. Now let’s say that we want to separate our products into different product types, so we would create a taxonomy named “Product Type” and then we create different product types or terms, let’s call them “Cogs” and “Sprockets”, this lets us divide our products into these two groups. Now let’s say that we also want to have a major division based on what our products are made of, we could create a new taxonomy and name it “Material” and then add the terms “Plastic”, “Steel” and “Aluminum” to this taxonomy. This would allow us to create products that are of any type and made of any material and have the ability to list them separately on the site by sorting them by their taxonomies and terms.

Posts

As we’ve already covered when talking about post types, a post is any single item in any post type. A post can also be further defined by one or more terms which themselves are part of a taxonomy.

WordPress Templates

Each of the templates in a WordPress theme are designed to handle a specific type of object, so, for every post type we basically have three templates. This number can actually be more or less depending on the capabilities assigned to the post type, how many taxonomies you define for your post type and if you need or want extra templates for some purposes. But as a general rule you will have one to three templates associated with each post type.

The Post Type Template

There can be exactly one “Post Type Template” for each post type. This template shows a list of the posts that are contained in the post type, typically in some type of abbreviated format. Take for example the post type template for the “Post” post type. This template is usually designed to show an excerpt of your last few blog posts with a link to the full post. It can be set up to do other things like show only the most recent post, however, this is unique to this built in post type and controlled through the settings of the site. It is not generally something that is added to all post types or part of the settings of the site without a quite bit of additional work.

A post type does not have to have a template at this level. For example, the “Page” post type does not have a template at this level. New post types can also be set up in this way. if a post type does not have a template at the “Post Type” level, it will also not have a template at the “Taxonomy” Level discussed next.

Since each template is designed for a specific object, in this case the “Post Type” object, and that object is a group of other objects (posts) this template can only show lists of post objects. There is no built in way to modify the content on the page that this template generates. You will not find an admin page that allows you to modify any content on this page. Any changes to the page that this template generates must be hard coded into the template file. If you want to be able to manage other content on this type of page then custom changes to the admin user interface will need to be done and these changes are not in the realm of your average WordPress developer.

The Taxonomy & Term Templates

If a post type has a “Post Type Template” it may or may not have a “Taxonomy” template, or it could have a taxonomy template and multiple term templates, one for each term in the taxonomy.

Please note that it is not usually typical to have term templates because that would mean that every time someone created a new term in the taxonomy someone would also need to create a new template for the term. It is simply too easy for anyone to be able to create new terms in the WordPress admin. Having term templates is really only useful if there is a specific term that you want to display differently than all others.

There can be exactly one template for the taxonomy (and one template for each term if you go there). If a template is not found for a term then the taxonomy template is used. If a taxonomy template is not found then the post type template is used.

As I said, you may not have a template at this level, this depends on if the “Taxonomy” level of the site will be displayed differently than the content displayed by the “Post Type” template. For example, let’s go back to our product example. Our main product page may show only a list of product types and not list any products, then we would create a taxonomy template to list the products in each product type.

Like the “Post Type” template, the “Taxonomy” and “Term” templates are designed for specific WordPress objects and these objects contain groups of posts so these template are also primarily for displaying lists of posts rather than single items or static content.

Unlike the post type template though there is an admin page in WordPress that allows you to modify some of the content for each term. However, the data that can be modified by default and that is usually displayed on these pages is quite limited. Not even all the content that can be edited through the admin is displayed by default, for example the term description. These templates and the admin pages associated with them need to be modified in order to show more than lists of posts in the post type.

The Post Template

Some people may say that I should talk about posts and pages separately, however, I don’t see it that way. A page is simply a post that plays by slightly different rules, and at this time the only post type that can play by these rules in the “Page” post type. To do otherwise would require some major modifications to your installation.

The “Page” post type can have several templates if the developer creates them. For example, if your site has a static home page and the home page looks different than the internal pages then most likely you will have a default template to show the inner pages and a special template used only on the home page. This is not always necessary; the developer may hard code this into the default page template giving the editor no choice. However, since the “Page” post type can’t really be categorized and they do not have a “Post Type” level template and we don’t generally show lists of pages with excerpts most sites will not use a lot of entries in this post type. Most of the pages of most of the sites I build usually are placed into custom post types so that we can have lists, like for products, vendors or portfolios. Something were we want to easily list groups of things and also show them separately. So I will concentrate on post types that play by the same rules as the “Post” post type.

For each post type you can have exactly one template to display posts. This template shows the content of exactly one post. Without a fair amount of customization you cannot show more than that on these pages.

Conclusion

The point of this post was that I hoped to explain the different types of pages generated by the different templates in a WordPress theme and what they include by default.

As you can see, by default each template generates a specific type of page and the content that is included on those pages, again by default, can be quite limited and not easily altered without also making changes to the admin pages that control them.

You can extend this content slightly by using widgets that can be displayed across the site. However, widgets too are limited in what they can do as far as I’m concerned. If a widget is not limited then as a general rule I find that they usually complicate site maintenance and increase confusion. I don’t like to use them unless I have no other choice or there is some specific thing that needs to be displayed in a sidebar or footer that is exactly the same on every page of the site that will rarely need to be edited.

The rigidness of what is normally included in each of the template types is the main reason that most WordPress blogs look like WordPress blogs; even, in my opinion, most of the themes that advertise they don’t look like a blog. Without a lot of customization to what the templates do by default there really isn’t that much you can do to change this.

90% of the time, if you want to do more than I’ve described here you’re going to need custom work done and a custom theme built. For example, if you want to show a list of products separated into categories on your static home page. Or perhaps you want to be able to have multiple content areas that you can edit on a per page bases using a WYSIWYG editor. Or you want to add content to those “Taxonomy Pages” that you can edit through the admin whenever you’d like.