WordPress used to be thought of more as blogging software than a Content Management System. Fortunately, more and more people are beginning to appreciate the flexibility of WordPress to manage more traditional website content. However, if you are new to WordPress, it may not be completely obvious to you how to handle the non-blog content within the context of WordPress.
I think the key to understanding how to use WordPress as a CMS for a traditional website is to understand the 2 main types of content that can be written in WordPress: posts and pages.
The basic difference is that posts are used for blog entries or articles while pages are used for what we might think of as more permanent (though not necessarily static) content in a traditional website.
Here is how the difference between posts and pages is described on the WordPress Codex entry for Pages:
In WordPress, you can write either posts or pages. When you’re writing a regular blog entry, you write a post. Posts automatically appear in reverse chronological order on your blog’s home page. Pages, on the other hand, are for content such as “About Me,” “Contact Me,” etc. Pages live outside of the normal blog chronology, and are often used to present information about yourself or your site that is somehow timeless – information that is always applicable. You can use Pages to organize and manage any amount of content.
So, if you think about a typical blog, the main index will usually show the first couple of paragraphs of 5 or 6 recent posts, and then you can click a Read More link to view the full blog post. In WordPress, whenever you are looking at a single, full blog post by itself, the template that WordPress uses is a file called single.php. On the other hand, the template that controls the traditional pages we’ve been talking about is called page.php.
It’s important to understand a little bit about WordPress template files at this point. A WordPress theme is a collection of files that allows you to customize the look (and to some extent structure and behavior) or your WordPress site. The theme is made up of PHP files called templates, which define how various content types are displayed on that particular WordPress theme.
The number of templates you include in your theme (or that will be included in themes you download/purchase) can vary, but most any theme will have a page.php template for pages and a single.php template for posts.
WordPress templates are similar to most other types of templates that you might be familiar with. The template defines what certain parts of a document will look like, and leaves at least one area open for editable content, which is added via the WordPress admin panel.
If you want a 7-page traditional website where 5 of the pages are the same but 2 are different, WordPress allows you to build custom templates such that different pages use different templates. In other words, all of your pages do not have to use page.php. For example, you could have 5 pages that use page.php and then set up additional custom templates for pages that require different layouts, functionality, etc.
With this setup, you can easily build a non-blog centered website with content managed through WordPress. It’s just a matter of defining any page templates you need and then entering content through the Pages module in the WordPress admin panel.
Defining and designing the templates is not much different from how you would design and build a static website. You can (and probably will) use PHP and or other dynamic components such as WordPress template tags, but there’s also nothing stopping you from building the templates as essentially just standard HTML with a main menu and any other elements you want to include across your pages.
Note: The templates will always have to be .php files in the end, but in some cases the only part of the document that uses PHP will be the editable part where the page content goes. Technically, you can also build the page with no PHP or content area as long as you still save it as PHP, but that would mean the page wouldn’t be editable through the WordPress admin panel.
The step-by-step process of setting up custom page templates is beyond the scope of this article, but the purpose of this post was just to explain the different between posts and pages. Hopefully this helps you understand how the use of templates for pages as opposed to templates for posts is central to using WordPress as a CMS for a traditional website.