Koodoz Design

a blog about all things goudagood! Koodoz Design is a creative design studio based in Richmond, Melbourne. We help businesses unleash their full potential through visual communication and clever design.

Subscribe for a free feed! Mmmm…

WordPress as a CMS: Pros, Cons and examples

written by Daniel Angel

10 Jul 2009

When we first began the process of re-designing our site, we knew that we wanted to keep it simple and make it cms/database driven. We also knew the blog klog would be powered by WordPress. Not wanting to mix things and overcomplicate ourselves, we eventually decided to manage the entire site with WordPress. Now, WP is a heck of a publishing tool. IMHO, now no other blogging tools available out there come even close to it. However, using it as a fully fledged CMS is a whole different issue.

If you decide to go this way, keep in mind that you’ll probably come across some hurdles. Powerful as it is, a vanilla WP installation/theme combination won’t get you far, so I wanted to share some of our experiences, the issues we had and how we solved them. Hopefully it will help some people out there. This post is the first delivery.

Site structure, Menu and Permalinks

a screenshot of the custom permalinks plugin

Sometimes you’ll need to go beyond WP’s conventions for menu structures, names and classes as well as the permalink structure of your site. It’s very frustrating to style a main menu without defining additional/custom classes and IDs. Enter Alex Dunae’s Classy WP list pages. This plugin gave us full control over the menu’s naming convention.

Also, we needed to keep a previously-defined URL structure. WP’s permalinks section is good, but does not provide the high-customisation degree that we needed. Michael Tyson’s awsome Custom Permalinks plugin was a life saver.

Different templates for different posts

a comparison of different templates for posts

We use WP posts as portfolio items, so we needed to treat them differently from actual blog klog posts, both visually and structurally. The problem is that the WP theme convention only uses one file for individual posts: single.php, so it posed a big problem. The solution, however, was super simple:

single.php:

if (in_category('portfolio-items-category')) {
	include(TEMPLATEPATH . '/portfolio-item.php');	
} else {
	include(TEMPLATEPATH . '/blog-post.php');	
}

Voilá! Sometimes one tends to overcomplicate things. That little code snippet was all it took to solve the problem.

Meta Information on posts and pages

You may need to store individual bits of information to retrieve/manipulate later. In our case, we needed to add additional information to each portfolio item. Things like technical specs, technologies, platforms and a single, unique identifying code for each project. WP Custom fields are your friends. You can retrieve them by using the get_post_custom(). The function returns an array that you can manipulate in any way you want.

Well, there we go. Hopefully I’ll write a couple more posts on everything we learned from this experience. If you have any questions, feel free to comment :)

This entry is filed under WordPress Stuff. You can follow any responses to this entry through the RSS 2.0 feed.

You can leave a response, or trackback from your own site.


11 Responses to “WordPress as a CMS: Pros, Cons and examples”

  1. Jason: 16 July 2009

    Excellent site,Thanks for this great post – I will be sure to check out your blog more often.Just subscriped to your RSS feed..

  2. Odaddy: 16 July 2009

    Nice!!

  3. Daniel: 17 July 2009

    Jason, Odaddy:

    Thanks for the comments :)

  4. gebelik: 30 July 2009

    i like this site. i added on my bookmark i thanks

  5. Daniel Angel: 31 July 2009

    @gebelik, thanks for that!

  6. Jessica: 7 July 2010

    Thank you for the great post. I am a beginner to wordpress and am building my first custom theme. I have taken your advice in using starkers to start from scratch and have installed classy list pages so I can have control over the menu styling. I am using wp 3.0 with menus and it does not seem to be working. The id’s are looking like this “menu-item-47″ instead of this “about”. any advice? is it compatible with menus?

  7. Daniel Angel: 8 July 2010

    Wow! This post has been up for a while and a lot of things have changed since I first wrote it, including my opinions regarding the suitability of WP as a fully-fledged CMS. I guess it boils down to what your site is about, and what you want to use it for. If the blog is going to be the main component and the rest of the site will revolve around it, then by all means, use WP to power the entire thing. If, however, the blog is not the central element, you should probably consider using Drupal, which has a very powerful blogging module. The beauty of Drupal lies on the fact that it is a framework, so it’s meant to “morph” into anything you want it to. Be sure to look at it before you make your decision.

    Now, regarding classy list pages, I don’t think you even need it on WP 3, as it has the functionality to customise menus straight out of the box. I haven’t explored it in depth, but the introductory video and this page are good places to start. I remember noticing that they did some really good work on menu customisation.

    Hope this was helpful! -daniel

  8. Jessica: 21 July 2010

    thanks Daniel! yes the new menus are great but I still can’t seem to change the id tags so I just decided to live with the “menu-item-4″ id tags. My client is using the site mainly for blogging but I agree with you, I would rather have built this whole thing using Joomla.

    PS – good job on your site, after creating my own, I have much respect for what you have done with yours.

  9. Daniel Angel: 21 July 2010

    Hi Jessica,

    Thanks for that :)

    I’ve been doing some exploratory research on the new menu system and it seems you’re right. Although it is immensely more powerful than before, it still lacks some granularity for us control-freak-designers.

    Check out the codex, in particular this page. Some of the wp_nav_menu() parameters are nevertheless very helpful.

    BTW, would love to see your site! -daniel

  10. Paul d'Aoust: 22 July 2010

    I kind of agree with your later assessment — after having done a few clients’ sites in WP, I’m seriously considering just going back to roll-yer-own in the future. WordPress is really versatile, and for clients who want a blog I’ll obviously still hang on to it, but it just feels too top-heavy, and for rapid content editing, it’s way slower and more awkward than my trusty text editor (no code highlighting).

    I also find it has more style hooks than a Christmas tree — a lot of the templates suffer from severe div-itis.

    There is one nice thing about WP, however — it has a healthy microcosm of plugin creators. And it’s so easy to find, install, and try plugins that work.

  11. Daniel Angel: 23 July 2010

    Hi Paul,
    WP (or any other CMS for that matter) is certainly overkill for small ( > 10 page) sites, particularly if no-one else will be messing with it. For people who know their way around html, they become somewhat of an obstacle.
    Having said that, some clients do need some sort of editorial control and that’s when you have to consider your options. I’m pretty happy with Drupal for mid to large-sized sites these days. I find it wonderfully versatile and extendable. Still, the choice has to be made on a case-by-case basis. Thanks for commenting!


Show your love: speak now…

Back to top!