Use WordPress As a CMS: Plugins, The Bare Minimum

How to use WordPress as a CMS is a popular question. Especially when you want to quickly throw up what is sometimes called “The Brochure Site”. Yep, that hoary throwback to Web 1.0, the static site. You’re going to template the site in PHP anyway, right? Why not just use WordPress and give your client the option of updating their content, while a million or so developers are working behind the scenes to make sure the code powering your site is the best it can be? Not a tough choice.

Besides, no one said it had to be completely static, did they? Here’s the rundown on a few plugins, the bare minimum you’ll need, that’ll turn a simple static site into a blazing fast dynamic one, with easily managed content, that you’ll love to use.

Random Content Excerpts

If we’re going to use WordPress as a CMS we need to use WordPress. That means not totally giving up Posts for the comfort of Pages. We want to take advantage of them. Think of Posts as shift-able content. Content that you can easily move around. Thanks to query_posts we can shift content by date or category or even well, just randomly shift it—with a plugin.

Except this plugin doesn’t really exist. That is, it doesn’t have a home. I just happened to stumble across it on the WordPress support forums and the person posting it there just happened to stumble across it on a mailing list. But it’s out there and we can use it.

  1. /*
  2. Plugin Name: Random Posts Query
  3. */
  4. function query_random_posts($query) {
  5. return query_posts($query . '&random=true');
  6. }
  7. class RandomPosts {
  8. function orderby($orderby) {
  9. if ( get_query_var('random') == 'true' )
  10. return "RAND()";
  11. else
  12. return $orderby;
  13. }
  14. function register_query_var($vars) {
  15. $vars[] = 'random';
  16. return $vars;
  17. }
  18. }
  19. add_filter( 'posts_orderby', array('RandomPosts', 'orderby') );
  20. add_filter( 'query_vars', array('RandomPosts', 'register_query_var') );
  21. ?>

Here’s an example of it in use with query_posts and the Sandbox theme:

  1. <div id="testimonial">
  2. <?php query_posts('category_name=Testimonials&amp;showposts=1&amp;<strong>random=true</strong>'); ?>
  3. <?php while ( have_posts() ) : the_post() ?>
  4. <div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>">
  5. <h2 class="entry-title">What People are Saying About Us</h2>
  6. <div class="entry-content">
  7. <?php if(function_exists(the_excerpt_reloaded)) {
  8. the_excerpt_reloaded(50, '', 'none', TRUE, 'Continue reading »', FALSE);
  9. } else {
  10. the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'');
  11. } ?>
  12. </div>

I’ve highlighted the important part: &random=true. What we’re doing here is querying the database with very specific criteria, our post must be in the category named Testimonials, we only want one post and we want it selected randomly. Sort of turns the Loop into a knot—but regardless, we get what we want, a randomly selected post. In this instance, from the category Testimonials. Use this plugin and code on a custom front page or about page and you’ve got some dynamic content happening.

Random Posts Query

Cleaner WordPress Excerpts

Notice another plugin in the code above? I’m also using the Excerpt Reloaded.

  1. <?php if(function_exists(the_excerpt_reloaded)) {
  2. the_excerpt_reloaded(50, '', 'none', TRUE, 'Continue reading »', FALSE);
  3. } else {
  4. the_excerpt(''.__('Read More <span class="meta-nav">»</span>', 'sandbox').'');
  5. } ?>

The Excerpt Reloaded cleans up the less than desirable WordPress excerpting function and turns it into something nice and 1 million times more intuitive, giving visitors something to click on (“Continue reading »” in the code above) right after they read an excerpt. No more strange bracketed ellipsis staring blankly back at us.

The Excerpt Reloaded

Category Pages as, well, Pages

Now in this case, if we’re going to go to all the trouble of highlighting content randomly, by category, do we really want to pack it down into a category and keep it there? What if I wanted to make a category page showing off all this random content? And not have it trapped in an ugly URL like this:

http://example.com/category/testimonials

But instead sit pretty near the top of the root-chain like this:

http://example.com/testimonials

Well, I’d use a plugin of course. Check out Top Level Categories by former MicroSoft developer Filipe Fortes. It pretty much does exactly what we want to do.

Top Level Categories

Professional Typography—Automatically

The benefit of using WordPress as a CMS is that it’s incredibly easy to edit content on your site. The downfall is that it’s incredibly easy to edit content on your site. Do you see what I’m getting at here? I sweat over my layouts and the presentation of content. Making a little change here, a little tweak there. Others… not so much. If it only got rid of widows (that one lonely word hanging out on the last line of a paragraph) Typogrify for WordPress would be a design godsend but it doesn’t end there. It fixes a whole bunch of web-type oddities and keeps your content looking fine. Don’t believe me? Check out what John Boardley has to say about WP-Typogrify at I Love Typography.

WP-Typogrify

Ironically, It Really is Static: WP Super Cache

Since we’re looking to use a dynamic CMS to power a static site why not finish it up by actually making it literally static? WP Super Cache makes static copies of your dynamic pages and serves those up instead while at the same time gzipping everything and speeding up you download times.

WP Super Cache

Even More Plugins

The list doesn’t end there. There are even more great WordPress plugins that will help you perfect the management of your “simple” brochure site. I’ll keep updating this list as I find more only adding the best. You can help out by leaving your suggestions/plugin-critiques in the comments.

Don't forget: You should follow me on twitter here.

Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

19 Comments

  1. Posted February 9, 2008 at 6:39 pm | Permalink

    I must say first, that this site is quickly turning into my first port of call for all things WP; great writing and incredibly useful tips.

    Anyway, I can vouch for the wonderful typogrify plugin. I’m wondering whether I should make the move from WP-Cache to Super Cache (any ideas?). Love that excerpts and search everything plugin too; and would one day love to see a single click WP upgrade.

  2. Posted February 9, 2008 at 7:22 pm | Permalink

    Hey, Thanks, Johno! I’ve added a link to your in-depth review on WP-Typogrify to the post.

    You know, I’ve never been blessed with an opportunity to put either plugin through it’s paces but I definitely would switch to Super Cache—after testing it out on a test site (like a subdomain on the same server). It’s only on version 0.5.4 right now. But casually browsing this site and my test sites with the caching on and off you can notice a big difference.

    And everyone, Johno, besides having the coolest typography site on the web, is also almost totally unbeatable on CommandShift3. Check it out.

  3. Posted February 13, 2008 at 7:54 pm | Permalink

    Ian,

    My other gripe with Wordpress viz using it as a CMS, is the old extensions issue on pages/posts.

    When will Wordpress give us a standardized way to control permalink formatting that covers BOTH pages and posts.

    Meanwhile I know no other way to achieve this than with a core hack… or are my htaccess skills just lacking?!

    -Alister

  4. Posted February 13, 2008 at 9:30 pm | Permalink

    That would bother me if I didn’t stick to %postname% for permalinks. There’s for sure got to be a plugin for that though. Right? Someone? Anyone?…

  5. Posted February 14, 2008 at 12:03 am | Permalink

    Hi Ian. I think we might be traveling in the same blog circles? Just wanted to say hello and I love your blog. I wish I had discovered it earlier :-) WP is still so new to me so consider me a subscriber and I hope to dive into the archives over the weekend. I can tell there’s a lot to read!

  6. Posted February 14, 2008 at 6:22 am | Permalink

    Glad to have you as a subscriber, Deb! I LOVE your portfolio and logo, by the way. Great stuff.

  7. Posted February 15, 2008 at 9:40 am | Permalink

    I would add Feed Control to the list of plugins for using WordPress as a CMS. It adds WordPress pages to your RSS feed. You can also exclude certain pages or posts from your feed.

    Enjoying your input on WordPress as a CMS.

  8. Posted February 15, 2008 at 9:51 am | Permalink

    Thanks, Kevin. I’ve added Feed Control to the list.

  9. Posted March 7, 2008 at 12:42 pm | Permalink

    Hello,

    I have used Wordpress as a CMS for a few projects already… I learned Wordpress when I created my blog and why stop there.. I could edit the theme to look like a custom blog so why couldn’t I do the same with CMS, basically you are just taking out the blog dates, times and just using the post to post content, you categorize it as you see it, and if you want you just post to the pages you want to post too. Clients always want control… more and more clients ask, Can I update the site? yes you can….. I never tried learning Joomla or Drupal and there are so much more.. but I believe Wordpress is going to grow more and more to accommodate CMS technologies.

  10. Posted March 7, 2008 at 2:07 pm | Permalink

    Hey,
    Thanks for featuring my plugin! I’m really happy with how it’s turned out.

    Also, you’ve got a cool blog here. I’ll be keeping my eye on it :)

  11. Posted March 7, 2008 at 5:37 pm | Permalink

    Chad, one thing I’ve noticed is that the design community around WordPress is fun. While I really love Drupal—it can do so much—I just can’t say the same thing there (yet). And yeah, WordPress is definitely going to grow as a CMS. Especially when the designers charged with making sites want to be part of a fun community.

    Hamish! You’re Welcome. Thanks for commenting. I’m crazy for the Typogrify plugin. Thanks so much for bringing it to WordPress.

  12. Posted April 16, 2008 at 10:08 pm | Permalink

    ” Thanks to query_posts we can shift content by date or category or even well, just randomly shift it—with a plugin. ”

    The phrase that says “even well,” doesn’t feel right. I just thought it could be phrased “, even better,” or “even, well,”

    Thanks for this excellent article !

  13. Posted June 15, 2008 at 8:13 pm | Permalink

    http://freshout.us/goodies/fresh-post-for-wordpress-wordpress-cms/

    Fresh Post v1.3

    Features
    Retrieve images from any URL and store/manipulate them on your server.
    Specify height, width, and numerous other requirements on your images
    Create multiple custom write panels
    Integrates with Role Manager to hide panels from users with the specified roles
    Hide obtrusive options in the write panel
    Field Labels
    Create any kind of custom field – Textbox, Multiline Textbox, Checkbox, Checkbox List, Radiobutton List, Dropdown List, Listbox, File, Photo
    Custom Write Pages
    Snipshot Integration and Native Cropper
    Image Thumbnail Preview
    Date Picker
    Audio Player
    CSS Class for Images
    Add Custom Write Panels for Pages
    Large File Uploads and Retrievals
    Sort Posts (Under Manage) by Write Panel Used to Compose

  14. tipper
    Posted August 6, 2008 at 12:52 pm | Permalink

    for an update on the subject go to:

    Things To Consider When Using WordPress as a CMS | Devlounge
    http://www.devlounge.net/publishing/things-to-consider-when-using-wordpress-as-a-cms

  15. Posted June 3, 2009 at 5:48 am | Permalink

    I’ve read post after post about manipulating WP to become a CMS tool. My thoughts thus far is as the old saying goes “it does exactly what is says on the tin”. Surely trying to manipulate a tool that is designed for blogging and attempting to make it into a CMS is just not good practice. Adding hacks and plugins to make it something else seems a daunting task for most designers. For developers this should be a straightforward task but surely going with a tool such as Expression Engine, KenticoCMS or SilverStripe would be best suited for content management.

  16. Posted July 13, 2009 at 11:39 am | Permalink

    I’m definitely trying Wordpress as CMS. I’ve invested a lot of time in using Joomla, but its just too slow once you add all those plug-ins.

  17. Posted July 26, 2009 at 10:10 am | Permalink

    I use Wordpress as CMS together with the hybrid theme framework and the adminimize plugin. I think its role managing capabilities are a bit better then the fresh post plugin.

  18. Posted November 28, 2009 at 6:29 pm | Permalink

    Hi guys,

    I’m very new to Wordpress, but am impressed by the plugins. However, slightly off-topic, but I’ve created a CMS that contains a few of these features either as standard, or as a plugin.

    An online demo and a free, downloadable version will be available very soon and can be seen at http://scottjarvis.com. I’d be interested to know how it compares for anyone who is familiar with wordpress.

    Thanks.

  19. lawless
    Posted January 31, 2010 at 7:28 am | Permalink

    @shivun – Actually I just switched one of my sites from the Silverstripe CMS to Wordpress because of all the headaches and debugging problems. It took me half as long to re-do it from scratch in Wordpress and I’m using 0 (zero) plugins. I’m just using a static page as my homepage with the most recent blog posts being pulled in.

    Silverstripes blog module was a nightmare for my clients. They are SO much happier using Wordpress as a CMS than they were actually using a CMS as a CMS. Go figure.

    I avoid plug-ins at all costs, just because it makes updating the Wordpress core a no-brainer. Typically you can accomplish the same functionality cleaner and easier with a bit of thought and searching through the Codex.

14 Trackbacks

  1. [...] Use WordPress As a CMS: Plugins, The Bare Minimum [...]

  2. [...] ThemeShaper.com has a good article on using WordPress as a CMS and lists a few plugins that come in handy for this: Use WordPress As a CMS: Plugins, The Bare Minimum [...]

  3. [...] Use WordPress As a CMS: Plugins, The Bare Minimum (tags: wordpress cms webdesign) [...]

  4. By Use Wordpress as a CMS with Thematic - Part1 on September 7, 2008 at 11:33 am

    [...] on Wordpress, so there is a lot of information out there. (people have written about this here and here and probably countless other places ). What I tried to do is use the power of the Thematic Theme [...]

  5. [...] Stewart undersells his guide with with this title: “Use WordPress As a CMS: Plugins, The Bare Minimum“. Indeed, it is extremely comprehensive in how you can use plugins to accomplish some of [...]

  6. [...] articles on using WordPress as a CMS: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, [...]

  7. [...] Use WordPress As a CMS: Plugins, The Bare Minimum [...]

  8. [...] Use WordPress As a CMS: Plugins, The Bare Minimum. This entry was posted in Uncategorized and tagged Code, WP. Bookmark the permalink. Post a [...]

  9. By Guide to your first WordPress website on June 2, 2009 at 4:58 am

    [...] Use WordPress as a CMS (with loads of handy plugins recommendation) [...]

  10. [...] Use WordPress as a CMS (with loads of handy plugins recommendation) [...]

  11. [...] ThemeShaper.com has a good article on using WordPress as a CMS and lists a few plugins that come in handy for this: Use WordPress As a CMS: Plugins, The Bare Minimum [...]

  12. [...] that went into comprising the list. I was very careful to not just repeat what other blogs have posted and hope you find something new and useful here.SEOHeadSpace2 SEOHeadSpace2 is an all-in-one [...]

  13. By Great list of WordPress Plugins | Social Media DJ on October 8, 2009 at 10:30 am

    [...] that went into comprising the list. I was very careful to not just repeat what other blogs have posted and hope you find something new and useful [...]

  14. [...] sin comentarios This great article from ThemeSharper explains how to use wordpress as a CMS. [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution. In addition, you may find yourself fitter, happier and more productive. Comment away.

Subscribe without commenting