Pages: The Static Content of WordPress

Reading Time: 2 minutes

Let’s jump out of order going down the WordPress Administration main navigation real quick and cover Pages instead of Media.

WordPress Pages are the very similar to Posts. Using our “post of type” phrasing, Pages would be a post of type Page.

Posts and Pages differ in the content they are meant to display. Posts are for content that is intended to show up chronologically in a feed. Pages are intended for more static content that isn’t as time sensitive.

For example, a Post is likely to be used for making an announcement about a new product your company is releasing. Where a Page would be used to display your company’s mission statement and history.

Aside from content there are a few other areas that Pages differ from Posts.

Page Hierarchy

Unlike Posts, Pages are allowed to have a parent-child relationship with other pages. This is useful for grouping page content as well as creating URL structures that show this relationship. Let’s say you have an About page on your site that you would like to break down further into more detailed pages. You could create a History page and set it’s parent to the About page. WordPress would then give the History page the URL domain.com/about/history. This also groups the parent and child pages together in the Pages Administration Screen.

Page Templates

This section is only relevant until WordPress 4.7 comes out in December 2016 when custom templates will be added to Posts.

Currently, only Pages can have custom templates. These are PHP files created in the theme that allow for Pages to display content in different ways. Developers can use these templates to give the user different layouts to choose from when creating a Page. A basic example would be a template for a Page layout with a sidebar and another for a layout without a sidebar. However, the customization can get much more sophisticated than that simple example.

Template Hierarchy

In order to determine what PHP file to use to display content when custom templates are used, WordPress relies on the template hierarchy. Essentially this is the order in which WordPress looks for specifically named PHP template files when certain content is accessed by the user.

The WordPress template hierarchy is complex enough for it’s own post. For a quick primer check the Codex.

Taxonomies

Pages do not come with Category support out of the box. The post type relies on the parent-child relationship for organization. Pages also have an Order attribute, which can be used to control the order in which pages are displayed when using functions like wp_list_pages.

That’s a brief introduction to WordPress Pages, also known as, posts of type Page.

Pin It on Pinterest