Getting past first base … Using WordPress as a CMS
With so many solutions out there for managing your website, you may wonder “Why would I use WordPress as a CMS when it wasn’t intended to be so?” There is no doubt that WordPress is primarily intended for blog development, but that’s not all it can do. There are many advantages to using WordPress over other content management systems, but on the other hand, there are also some instances where WordPress may not be the right fit. Please note that WordPress is not a fix-all, do-all solution, so your first task in making a CMS decision is to weigh the pros and cons of each platform. Realistically WordPress is better for smaller sites, as many clients of larger size will need something a little more fine tuned to fit their exact needs. When researching whether WordPress will be right for your project, you need to ask yourself these questions:
- Built-in Functionality – Will WordPress have enough functionality out of the box, or will plug-ins be required? Do some research and make sure that there are plug-ins readily available that will accomplish the functionality you are looking for.
- Hosting Requirements – Do you have PHP version 4.3 or greater, and MySQL version 4.0 or greater? WordPress won’t run without them.
If neither of those questions raises any red flags, WordPress may be a great vessel for your next project. Here are some of the many great reasons to use WordPress as a CMS:
- WordPress is Open Source – Open Source software allows you to use it free of charge for your personal or commercial sites since it is licensed under GPL.
- Easy to Use – Every piece of software, whether on or offline, has a learning curve. WordPress requires hardly any time to get used to its interface.
- Standards Compliant - WordPress is ahead of the game in following Web Standards, and keeping your blog or website standards compliant.
- Theme Based Layouts – If you’re not a designer or a developer, no problem. You will never run out of new templates to try out on your site or blog. There are many free, basic themes to choose from, or you can even purchase more advanced themes for a small price. This allows you to have the freedom of changing the look and functionality of your site whenever you please.
- Completely Customizable – If you are a designer or developer, then you’re in luck. WordPress gives you complete control of the look and functionality of your blog or site by letting you create custom templates. You can find everything you need to know about creating a WordPress theme by using the easy-to-understand WordPress Codex.
- Search Engine Friendly – WordPress has many SEO-friendly options, such as the ability to send pings to other sites, create categories, tag your posts and use heading tags. They even offer plug-ins that will manage your HTML title tags and meta information.
- Multilingual – There’s no need to fear using WordPress as a CMS for a client that may live in another country. WordPress offers plug-ins that enable language settings for a user’s dashboard.
- One Click Installs and Upgrades – Most hosting companies offer a one-click install of WordPress. Also, any time that WordPress releases a new version, you can update directly from within your WP dashboard, there’s no need to use an FTP client for uploading new files.
- Thousands of Plug-ins – This may be the only item needed to push WordPress to the top of the list when choosing a CMS solution. When you install WordPress, it is very bare-bones, which is a good thing. There’s no unnecessary functionality that weighs down your load time. There’s also no need to hack around and remove actions that your client will never use. You can simply add the functionality you need via plug-ins, and trust me – there are plug-ins out there for just about anything you can think of.
- The Wordpress Community – Whether you’re new to WordPress, or a seasoned veteran, the large community of developers backing it comes in handy. They are always willing to offer a lending hand to anyone that has a question.
Now that we have covered an overview of why WordPress may be an excellent CMS, let’s discuss how to begin transforming your WordPress installation into more than just a blogging platform by first creating a static homepage, and second, using custom write fields.
The Static Homepage
The first step in distinguishing your site from a normal WordPress blog is to set a static homepage. This used to be a little more difficult in past versions of WordPress, but as of version 2.1, you can simply set one of your WordPress pages as your homepage by going to Administration > Settings > Reading panel. It really is that simple.

Custom Write Fields
To take WordPress even one step further, you can add custom fields to your posts and pages. As an example, we are using the custom write fields to display our secondary titles and thumbnails for each post at Foraker. We do this because we want to reference these variables throughout our blog, as well as have the values display outside the_content area. For your convenience, we have constructed a quick tutorial on how to set up your own custom fields in WordPress.
Setting up Custom Fields
- Once you have written your post content, scroll down the page and find the container titled “Custom Fields”.
- Here, you will want to specify a name for the custom field. The name can be in caps or lowercase; the only restriction is no spaces or symbols. Just be sure to remember how you set it up.
- Next, assign a value to the field. This value is what will appear visually on your blog or site.
- Then click the “Add Custom Field” button to save that field and value to your post. (There is no limit to the number of custom fields you can add to each post or page.)

Display Custom Fields
The next step will be to call your custom fields to display on our blog or site. To do this for each post, use the get_post_meta() template tag. (Also just to note: The tag must be put within ‘the_loop’ in order to work.) The first thing you are going to want to do is open the template on which you would like the custom field to display. For this example, let’s just assume that you want your custom field “Sub-title” to display on the Single Post (single.php) template. Open that up, find where the template is calling ‘the_loop’, and call your “Sub-title” custom field using get_post_meta() template tag like so:
1 | <?php $sub = get_post_meta($post->ID, 'Sub-title', true); ?> |
Once you have called the custom field “Sub-title”, you need to display its value by placing a ‘php echo construct’ inside the loop where you would like it to appear:
1 | <?php echo $sub; ?> |
As an example, below is ‘the_loop’ before you added the custom field:
1 2 3 4 5 6 7 8 9 10 11 12 | <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div><?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><?php the_title(); ?></h2> <div class="entry"> <?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?> <?php tcwJKR_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> <?php the_tags( '<p>Tags: ', ', ', '</p>'); ?> </div> </div> <?php comments_template(); ?> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> |
And here is ‘the_loop’ with the custom field added, and with some additional styling of the text value:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div><?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><?php the_title(); ?></h2> <?php $sub = get_post_meta($post->ID, 'Sub-title', true); ?> <h3><?php echo $sub; ?></h3> <div class="entry"> <?php the_content('<p class="serif">Read the rest of this entry »</p>'); ?> <?php tcwJKR_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> <?php the_tags( '<p>Tags: ', ', ', '</p>'); ?> </div> </div> <?php comments_template(); ?> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> |
If your custom field value is an image and not text, simply place the php echo construct as the image source:
1 2 | <img class="thumb" src="<?php echo $image; ?>" alt="" /> |
Adding custom fields, when mastered, can be the easiest and most dynamic way of pushing your WordPress blog or site to the next level.
Recommended Plug-ins
As I have mentioned throughout this article, plug-ins are one of the strongest reasons why WordPress is at the top of the list for a CMS solution, so I wanted to provide a list of plug-ins that can really help your WordPress blog start to feel and function more like a website within just a few minutes.
- Advanced Excerpt – The default excerpt created by WordPress removes all HTML. If your theme uses the_excerpt() to view excerpts, they might look weird because of this (e.g. smilies are removed, lists are flattened, etc.) This plugin fixes that and also gives you more control over excerpts.
- All in One SEO Pack Optimizes your Wordpress blog for Search Engines. Some features include: canonical URLs, nonce Security, automatically optimized titles, automatically generated META tags, avoidance of the typical duplicate content found on WordPress blogs, overrides for any title, and the ability to set any META descriptions and keywords you want.
- Breadcrumb NavXT – This plug-in generates location-based breadcrumb trails for your WordPress blog. These breadcrumb trails are highly customizable to suit the needs of just about anyone. The administrative interface makes setting options easy, while direct class access is available for theme developers and more adventurous users.
- WP-PageNavi This plug-in gives you nice clean pagination, so instead of the default “Older Posts” and “Newer Posts” links, you can have your pages or results listed out in numerical order for easy and simple navigation.
- WP-Syntax provides clean syntax highlighting using GeSHi, which supports a wide range of popular languages. It supports highlighting with or without line numbers, and maintains formatting while copying snippets of code from the browser.
- Contact Form 7 can manage multiple contact forms. Plus, you can customize the form and the mail contents flexibly and with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.
- dTabs dynamically creates a tabbed navigation for your WordPress blog or site. You can filter what pages or posts are listed as tabs and order them however you like. It can also dynamically create dropdown menus for any child pages on your blog or site.
- Search Unleashed This is one of the best plug-ins for searching I have seen for WP or on any other content management system. This plug-in will extend the standard search with a full-text search across everything: posts, pages, comments, authors, meta-data – with the output from plug-ins included in the search. Search phrases are highlighted, as are incoming searches from Google, Yahoo, and most other search engines.
Joshua Giblette – Art Director, Foraker — Joshua has been excessively addicted to web design and development since 2002. He thoroughly enjoys creating new ways to push modern online interactions and trends to the next level, as well as motivating, teaching and sharing personal design philosophies with others any way he can.
This post was originally published on August 6th, 2009 on the Foraker Blog. It is re-published here with permission.
The Content Wrangler























Recent Comments