Using Wordpress as a CMS - Part 2
A principle of good software design is to balance the demand for new features with the necessity to maintain a high level of usability, and one sign of good software is that the interface remains uncluttered and intuitive as new functionality is added. For an example of how to do this the wrong way, look no further than Microsoft Word, which with each new release becomes more bloated and crammed with features that most people not only will never use but could never find out about even if they wanted to use them.
For examples of how to do this the right way, you could point to the web apps done by 37signals (e.g. Backpack), or to Wordpress. Over the years, Wordpress has continued to grow and to integrate new features, but has done a fairly good job of not allowing them to clutter core functionality. Following good usability principles like progressive disclosure means newbie users can jump right in and do what they want, while you don’t alienate advanced users by babying them with an impoverished interface.
A quick Google search for the terms “wordpress cms” reveals a plethora results, and the Wordpress developers are aware that many people are using Wordpress for much more than out of the box blogging. With that in mind, they continue to roll out functionality that makes it easier to use the platform as a content management system that can accomplish most of what you would want from your CMS.
Some of these features that you will find useful if not crucial to using Wordpress as a CMS include:
- the option to set a static or fixed homepage Prior to Wordpress 2.1, you had to either hack around and create and upload a new homepage, or use a Wordpress plugin to accomplish the same thing in a slightly more graceful way. Now, setting up a static homepage is as simple as going to the Settings > Reading panel and making the choice there. For more information, see Creating a Static Front Page
- custom fields custom fields allow you to associate information with a post that goes beyond the parameters given to you by Wordpress. Suppose, for instance, that you’re creating a Wordpress site in which certain products for sale will be entered into the database as posts. Well, you’re going to want to store a bunch of particular information that will be associated with each product/post, including cost, availability, shipping, sizes, and so on. Using custom fields, you would type in a new key (say, “availability”) and then under the value, you would enter either “available” or “sold”. Then, when editing say, single.php (the wordpress template for single posts) you would access the data like so, from within the Loop:
<?php echo get_post_meta($post->ID, 'availability', true); ?>
If you wanted to make this data available outside of the Loop (e.g., in your sidebar), you would just type<?php global $availability; $availability = get_post_meta($post->ID, 'availability', true); ?>
And then in sidebar.php, you would include<?php global $availability; echo $availability; ?>
- page order Wordpress has only recently added the ability to define the order of your page manually, rather than using the options Wordpress provides for wp_list_pages(), which are to sort by alphabetical order, or to sort by id. Though the functionality is new (and still a bit “janky” according to Wordpress), it’s nice to know you won’t have to rely on third party plugins for such standard CMS features
In the next installment, I’ll discuss a couple more essential pieces for using Wordpress as a CMS, including page templates, and also go further into third party plugins.