non-blog pages, templates, and menus in WordPress

Although WordPress started out as a blogging tool, it has evolved into a general purpose content management framework.  The Twenty Eleven theme includes three template “Page” types, which I’ve illustrated here:

For historical reasons, WordPress uses the overloaded term “Page” for what might better have been called an “article”.  In WordPress, a Page refers to an item of content that is not a blog posting.  By default, these article pages are organized into an automatically generated menu structure, tied to the main menu bar at the top of each page.  The default menu organization is based on the hierarchical relationship and ordering assigned to each page, and the menu item text (navigational label) is simply the article title.

Substituting a custom menu instead of using the default menu scheme provides much greater flexibility.  (Use the Dashboard’s Appearance, Menus command to get to the menu customization screen.)  For example, you can customize the text of menu items, so they needn’t match article titles, and you can incorporate blog posts, archive pages, and types of content other than article pages into the menu.

You can build a custom menu organization that does not depend on hierarchical, parent-child relationships specified with the article pages themselves.  This avoids potentially undesirable complications due to the way that WordPress assigns URLs (permalinks) to pages.  When a page is specified as having a parent, the assigned URL is the parent page URL, followed by a slash and then the title of the child page (i.e. the “slug” form of the title).  This results in a longer URL, and one that is less likely to be stable under reorganization of the site.  For that reason, I’ve avoided using WordPress’ page hierarchy mechanism, by designating “no parent” for each of my pages.

Related references:

One thought on “non-blog pages, templates, and menus in WordPress”

Leave a Reply