OK, so everybody is always talking about how WordPress is no longer a simple blogging platform but a true CMS.
This is true, WordPress can be put to use for a wide variety of websites, whether it be a local community website or, especially with the help of WPMUdev.org, a fully-fledged social networking arena.
However, there are a few things that you can do to truly revolutionize your website, and to make it much more of a CMS than is currently available via most themes, and that is what this article is all about.
This has been written for those who are new to WordPress, as well as seasoned users, so there will be certain things here that may be obvious to many users, such as how to use a nicer permalink structure or create a page template, but just skip those sections, as there may be a hidden gem here that will give you that excited feeling we get, and have you rushing off to test some code. For those of you looking to branch out form the norm, take a look, and this may give you some pointers.
Changing Your WordPress Permalinks
Don’t you just hate those URL’s you get when using the default setup of WordPress that look something like:
http://YOURSITE.com/?p=123
They really don’t help with your Google rating at all, and that is something that should make you rush to make changes.
I always use the following format, and believe that this is what many others use also:
http://YOURSITE.com/categoryname/posttitle
To do this, go to Settings>>Permalinks & select the Custom Structure, and type in:
/%category%/%postname%/
This structure is fine for smaller blogs but may cause performance problems with larger sites. To find out more about this, take a look at this article.
How To Set a Static Page in WordPress
Nothing looks more bloggy than a home page with a list of latest posts.
This is why you may want to consider using one of your pages as the home page instead of the traditional one.
To do this, go to Settings>>Reading and select the page that you would like to use as your home page.
Creating Page Templates in WordPress
To create a different look for different pages, you just need to create new page files, which can then be uploaded to your main theme’s folder and selected from a drop-down menu whenever a page is created or edited.
The easiest way to do this, is to edit the current page.php file, and make your changes to it, save it under a different name, such as page2.php, and then select it if you want to use that design.
Of course, it would be best to name it something more descriptive, especially if you create a variety of different templates, as you will then know where you are when editing pages.
At the top of the new template page, you will need to have the following:
<?php
/*
Template Name: YOUR TEMPLATE NAME
Creating Category and Post Templates in WordPress
There are ways to create a different look to various categories by hard-coding, but there is a much simpler way, and that is by using the Idealien Category Enhancements plugin.
Not only will this allow you to have a different look to the category.php page but, depending on the category you are in, it also allows you to have a specific look to all posts in a certain category/sub-category.
This involves adding code at the top of each edited category page, in the same way as with the page template above. This code is:
<?php /*
Category Template: Custom Template Name
*/ ?>
I have found that the section of this plugin that deals with linking in your seperate single.php files does not always work correctly, as it doesn’t seem to call the seperate file.
If this happens, then don’t panic, as there is a plugin that deals with this very nicely.
The Single Post Template plugin allows you to easily add as many templates to your create/edit posts section of admin, and you can then select the template you wish to use for each post. This is probably a much better way to deal with it if your posts are in multiple categories, as you get to choose which template to use.
Simple Redirection in WordPress
If you want to have full control over your menus, enabling you to link easily to posts or external links from a page menu, this is very simple to do, with very little editing.
Open your page.php file, and find the following:
<?php get_header(); ?>
Change this to the following:
<?php
global $post; // < — globalize, just in case
$field = get_post_meta($post->ID, ‘redirect’, true);
if($field) wp_redirect(clean_url($field), 301);
get_header();?>
Once you have done this, you can create a simple redirect by creating a new page and using the custom fields section.
Name: redirect
Value: FULL URL TO WHERE YOU WANT TO REDIRECT
Showing Alternate Headers on your WordPress Pages and Posts
If you want to show different headers, depending on which part of your site users are on, you can do this by replacing a single line of code.
Find the following line of code in a file such as page.php, single.php, category.php, etc:
<?php get_header(); ?>
Replace this with this code:
<?php include (‘ALTERNATEFILE.php’); ?>
To make this easy on yourself, you should use alternate names such as header-portfolio.php, header-blog.php, header-gallery.php, etc.
Calling Alternate style.css files in WordPress
So, you have a different header for various sections of your site, but the CSS is all the same. Why not have a seperate CSS file for different areas of your site?
Again, this is done by simply replacing a single line of code.
Find this code (or something similar):
<style type=”text/css” media=”screen”><!– @import url( <?php bloginfo(‘stylesheet_url’); ?> ); –></style>
Replace it with this code:
<link rel=”stylesheet” href=”/wp-content/themes/imwp/style2.css” type=”text/css” media=”screen” />
I hope that this article has shown you a few things you may not have known about, and will enable you to make WordPress work for you as a CMS more than ever.
I am currently working on a website that includes all of these methods, so why not take a look at it and see it in action:
Plugin Downloads
These are the two plugins discussed above, in the category/post/page templates section.
Idealien Category Enhancements





Pingback: Using WordPress as a True CMS – WPMU.org – WordPress, Multisite … | Belum Ada Nama
A few of these tips seem to be hacks that aren’t needed for functionality that is built in to WordPress, especially since the release of 3.0:
Category Templates can be created by calling them category-slug.php or category-id.php.
Single post templates can be created for various post types by calling them single-posttype.php.
WordPress 3.0 gives users tons of control over menus from within the new navigation system. No need for queries and custom fields.
The new WordPress header system allows you to easily add header images on a per-page basis.
When I was looking to see how to do this for my own site, I didn’t come across those.
I’ll look into it and do a little rewrite :)
The reason I’ve done it as above on my site is to make it easy to choose the category look that you want. For example, you can use the category-slug.php way of doing things, but this takes away your choice if a post is in two categories.
For example, if I have a film showing in more than one of my film festivals (each festival having its own category look), I will have the post taking the style of the next event, by simply selecting it from a drop-down menu. If left to a category-slug, it would make the decision for me.
It is similar with the single.php file.
However, the new menus system in WordPress 3 are something I need to take a look at more closely. They will make it much simpler than having redirects.
Joe, that makes sense. But definitely get to know the new navigation menu. You’ll never look back, it’s so dreamy.
I agree. I’ve been looking at it since you said about it, and it is so much easier to control everything without the need to go into the code.
Because I’m still learning a lot, my method (of madness) with WordPress is to figure out how to do something when I need to. I really needed to learn about these menus :)
Pingback: WordPress for Non-Profits: The Complete Guide - WordPress, Multisite and BuddyPress plugins, themes, news and help – WPMU.org
Pingback: WordPress(留着看) | 黑山老妖(Ms Black.S)
Hi there, I liked this post.
To be honest, I always thought of wordpress as a blogging system and never tried to use it, I used to use joomla.
I had problems with joomla because of it’s it is so complex specially for those I design websites for.
about 2 months ago I used wordpress because someone wanted a very easy website, and I installed wordpress for him and modulated it, but I faced the problem that there is no really cms theme, except for those exponsive and restricted ones.
I decided to design a wordpress theme which gives full functionality of a cms, and I have progressed a lot, not my website is almost complete, and once I finish my theme, I will present it on my website along with other themes.