My Opinion WordPress

Will Flat-File Dethrone WordPress? Unlikely.

WordPress is out. Flat-file is the new wine. Or so the developer literati claim. I beg to differ. I also think these claims are an indicator of a serious problem with the open source industry: The people who develop Open Source applications are disconnected from the people who use their applications.

Flat-file vs WordPress: A 1 minute primer

If you’ve never heard of a flat-file before let me give you a quick primer: A flat-file is different from a “normal” CMS (like WordPress) in that it doesn’t use a database to dynamically generate pages. Instead it’s a hybrid model using JavaScript and other clever techniques to serve up individual or combinations of static files or pull content from content repository files (basically a spreadsheet or text file). The key here is flat-file solutions don’t need a database and usually don’t need PHP. (The historically savvy reader will now realize that flat-file CMSes are essentially static DWTs reinvented. That would be correct.)

There are some definite benefits to a flat-file (or what we old fogies call “static sites”) approach: You don’t have to rely on a complex server array for the site to work so your site won’t buckle under the sudden load of thousands of visitors, each page is an individual file so it will (at least in theory) load quicker, and you don’t have to deal with complex server management.

There are many flat-file solutions available and more coming online every day. This is after all the new wine for developers and everyone wants a taste. You have your CMS-style options like Ghost (originally proposed as a “simplified WordPress experience”), KirbyStatamic, and Jekyll – all of which have been lauded as “WordPress Killers“, and you have your externally hosted solutions like Harp (which uses DropBox as the file repository) and even DIY solutions that allow you to use Google Drive as the file repository. And you have services like GitHub Pages which let you use advanced developer tools to publish basic static websites.

And yes, I am aware there are a wide range of options here, that I omitted your favorite solution, and that my explanation is oversimplified. 

Ghost Face Killer?

When Ghost was proposed and then launched it was to much fanfare and celebration. Bold predictions were made of the imminent demise of WordPress due to Ghost’s simplified user experience and obvious appeal to bloggers. It’s safe to say these predictions did not correspond with reality. Why? Because setting up Ghost is not easy. In fact it’s quite complicated and requires a high level of expertise. Same with most if not all the other self-hosted flat-file CMSes. They may have a simplified file structure and user experience, but if people can’t figure out how to make them work, they won’t use them.

To curb this problem Ghost has launched a hosted for-pay service (though my theory is this was the plan all along) where you simply set up and pay for an account and start blogging. Which is no different from what, or Medium, or countless other hosted blogging services are already doing. So when flat-file becomes a hosted service the differentiation disappears.

“Kill your databases” they said. “It’ll be fun” they said…

One of the prime arguments for using flat-file is that you don’t need a database for most sites. It goes something like this:

“For a marketing site with 5 to 8 pages a database is just bloat. You’re better off just writing the code yourself.”

This is true in some cases, and if you are writing the code yourself you don’t need a flat-file solution either! However most sites today are not (or should not be) 5 to 8 pages even if they are marketing sites.

More than anything else the value of the web lies in the limitless potential for publishing. You don’t have to restrict yourself to a set number of pages or articles or images. You can publish as much as you want. And you should. The more quality content you publish, the more likelihood it will be seen, shared, and acted on. So when I see someone talking about a 5 to 8 page marketing site and the lack of need for a database my first question is “what about the attached blog?” There are very few cases I can think of where adding a blog with constant updates to a site would be a bad idea. In most cases adding such a blog can be a tremendous benefit to search and share traffic and the blog can even become the primary marketing tool. And once you have a blog and comments and other things you are moving into database territory. Sure you can use a flat-file CMS for this but it’s not really a good idea.

The Reality Distortion Field

I believe the emergence of the flat-file CMS has less to do with a consumer need than a developer desire to create something new and dethrone the current King of the Open Source Hill. While the argument for these solutions is that proper CMSes like WordPress are too big and too bloated for most users the alternatives they offer are more complex and don’t address the main appeal of WordPress:

What makes WordPress so popular, and the reason a lot of developers hate it so much, is that anyone can do it. You don’t need to understand Git or Markdown or Node.js or even PHP or MySQL to set up, configure, and publish content with your own self-hosted WordPress site. A complete novice with limited web browsing experience and a credit card can get a shared hosting account and publish content on a shiny new WordPress site within half an hour.

WordPress is a tool for everyone.

The flat-CMS tools touted so aggressively by developers on the other hand are developer tools built for developers by developers. Don’t believe me? Pick a random person off the street and ask them when was the last time they did a Git commit or wrote something in Markdown. The real world user of WordPress is not a developer. The real world user is someone wanting to share their thoughts, ideas, images, or art with the world in a simple and easy way.

When a flat-file solution uses Git commits or Markdown or “write your own HTML” as a marketing tactic you know all you have to know: This is not for the people, it’s for the developers who built it.

Rumors of WordPress’ demise are greatly exaggerated

WordPress is not dead or even on the decline. And flat-file solutions are not a threat to its position at the top of the Open Source Hill. The real threat to WordPress is actually WordPress itself, and this is something I’ll write more about in the future. While the flat-filers are wrong in their claim that flat-file is easier or better than WordPress, they are right in that WordPress is getting too complex and too heavy. For WordPress to continue its growth and eventual takeover of the entire published web it needs to slim down and become more modular so it can address the needs of an ever more diversifying user base. And those who build their businesses and reputation on WordPress need to realize kindergarten is over. We are not just playing at this any more. Serious business relies on WordPress and WordPress is serious business.

I would love to hear your thoughts on this topic. Are you running a flat-file solution? Have you abandoned WordPress for something slimmer? Leave a comment and pipe in.


News WordPress as CMS – WordPress as a Magazine CMS

Last year I was contacted by two veterans of the publishing business with an idea for a new online magazine called “Frugalbits“. It would be a daily publication in which readers would find deals and ideas on how to be more frugal – a virtue I think we all wish we had more of. They were looking for a highly customizeable web solution for the site and had realized that the answer might be WordPress. Smart ladies.

Several months and many hours of nit picking code later and Frugalbits is now finally live to the world. It’s a labour of love for me as well as the crew behind the site and it is a project I am exceedingly proud to have been a part of. So, without further ado, let me walk you through some of the interesting elements of the site:

A Carousel of Stories

Early on in the process the request came in to have a featured story carousel at the top of the front page. Unlike many other such sites the Frugalbits team didn’t want to have multiple text stories on the front page but requested instead one main story, named The Daily Deal, to be featured and then have a carousel with the latest 8 stories displayed at the top. Over the years I’ve worked with many different featured story plugins and carousels and as with pretty much every other plugin I come into contact with I’ve hated them all. For this one I decided I’d go out and find something that could be customized down to the last pixel and that ran independently of the whole WordPress plugin regime. And after a lot of searching I finally found a JavaScript based carousel I could take apart and put together exactly the way I wanted it.

The carousel requested would feature 8 stories (4 and 4) and would have a square story picture, a tagline on a translucent banner and the story title itself. In addition the coloured banner the story title would go on should change depending on the category the story belonged to. This meant I needed to create a loop in which 4 fields were queried for each story: thumbnail, tagline, category and title. It quickly became apparent that apart from the title the rest of the fields had to be customized for each story. To solve this I created 3 custom fields; thumbnail, cat and tagline, and the story editor filled out each of these taglines with the appropriate content. It worked quite well and I was satisfied that this solution would work

But. After a beta launch one of the editors brought up a point I never considered: The first entry of the carousel would always be the same as the story on the front page. And since the front page only had one story this was to put it midly somewhat redundant. Fortunately WordPress has an answer for this type of situation: offset.

An explanation: The carousel is populated using the standard query_posts() function. By using the offset variable in conjuction with posts_per_page I can define how many posts the query should “skip” before starting the list. And since I just wanted to skip the first (front page) post, that value should be 1. Problem solved.

Adding an Author Box

Because Frugalbits is a magazine it has both “normal” articles and also columns written by a select group of columnists. The request was that for these columns there be a box at the top right under the title with a photo, name and a short bio for that columnist. WordPress doesn’t have a standard function to add such an author box and though there are plugins that do it they are clunky, full of garbage code and not easy to style. I chose to go hard core on this one and just write it right into the single template using a conditional custom field. The result was the nice chunk of code below which produces a nice CSS styled box with the author Gravatar, category name, author name and WordPress user bio when activated with a custom field with the name “author” and the value “true”:

ID, 'author', true))) { ?>

is by

Custom templates

One of the most important features of the Frugalbits site is actually something you hardly notice: The custom templates. Depending on where you are in the site the layout changes subtly. The front page features the carousel, the single post pages have the optional author box, the category pages have only the right sidebar and show thumbnails for each story and the legal pages have an entirely different sidebar from the rest. To top it off the F Spot category has an entirely separate tempalte that looks nothing like the other ones. All this is done by using conditional statements and creating custom theme files for individual pages and categories.

Now that it’s launched I’m looking forward to hearing what people have to say about Frugalbits and it’s functions. Feel free to leave your questions and comments below and please visit the site and learn how to be frugal yourself!

WordPress WordPress as CMS

New WordPress-based Site:

AnnyChih.comTwo weekends ago my sister-in-law Anny Chih asked for some help sprucing up her WordPress blog. She wanted to apply for The Best Job in the World – the Tourism Queensland online video contest where you post a 1 minute video application to become the island caretaker of the beautiful Hamilton Island in Australia – and use the blog to showcase her talents and provide information about both herself and the islands.

Her blog was running the default theme but she wanted something that reflected the contest and also her own sunny disposition. She sketched up a rough draft in PhotoShop and let me get to work on it. I set aside one day to finish the entire redesign (totally crazy) and here is the result.

WordPress as CMS

Off the top you’ll notice I switched the front page to a static one to showcase the video and some info about the contest and Anny herself. The blog portion of the site has been moved to the back end and is accessible from the main menu and also from the Recent Posts box on the bottom right hand side.

Custom Field Boxes

Custom FieldsAt the bottom of the front page there are three boxes containing from left to right info on the contest, Anny’s 4 most recent tweets and the titles of the 5 most recent posts. The three fields are populated using custom fields from within the WordPress admin area so that they can easily be changed later. In the case of the Twitter box it is populated using the technique outlined in my Create a Twitter Box in Your Sidebar tutorial.

I used this site as an example during WordCamp Whislter last weekend to demonstrate how you can use custom fields for advanced layouts. The entire talk with code examples will be posted over the weekend.

Subtle Graphic Effects

I usually spend a lot of time making sure the sites I design have compelling and interesting graphics. In the case of Design is Philosophy I took the principle to the extreme but on I focused more on subtlety. For example, the background graphic with the bubbles is separated from the header image so that if you change the size of the browser window you’ll see the two images moving independently of each other. It’s a very subtle effect but it means that even people using smaller screens see the circle graphic Anny came up with.

Within the pages and posts I’ve also added graphic elements like the glowing underlines using CSS. It’s a simple trick that makes the content look more refined than simple solid lines.

Threaded Comments

Threaded comments
One of the major upgrades in WordPress 2.7 was the inclusion of threaded comments. By activating and styling this fucntionality the visitors to the site now have the ability to carry on conversations without being confused by the comment order. Again it’s a subtle effect that greatly enhances the experience for the visitor.

CSS Expression Web News WordPress as CMS

WordPress as CMS – The Project

I’ve been talking about this for a while now and it’s time I got a little more specific. It is my contention that with some small tweaks, WordPress can be used as an excellent Content Management System (CMS) and used to serve small-scale business websites. This isn’t something revolutionary – a simple Google search on the words “WordPress” and “CMS” gives you many interesting entries – but I don’t think the full potential of this alternate use has been explored. So I’ve taken it upon myself to see just how much I can get out of this small little program and if it can be used to serve my many clients in a more effective manner.

Why WordPress

That’s the first question I get: “Why WordPress? What’s the point? Why don’t you just use a CMS like Joomla! or Drupal?” To answer the last question first, in most cases using Joomla! or Drupal is like trying to kill an ant with a tank. Not only is the tool way too big and wasteful to do the job, but chances are the ant slips between the belt threads and you don’t actually achieve your objective at all. These huge Open Source CMSes are excellent if you are building large-scale community based websites with multiple blogs etc etc but for small business applications they are often too large and cumbersome. What’s needed is a simple, easy to understand CMS that gives the client the ability to quickly edit, update and manage her website with the least ammount of hassle. Sure, you can build something like that yourself, but why bother when there is already an application that pretty much does what you want available for free?

There are a couple of other reasons why I want to tap the full potential of WordPress for this project: First off, WordPress has an extensive and growing library of plug-ins and ad-ons that make it a very powerful piece of software. Seccondly, blogs have become an excellent way of promoting yuour business by letting your clients interact with you on a semi-informal basis. And WordPress is a blogging platform. Nuff said. Thirdly (and maybe most importantly), WordPress blogs has an uncanny ability to get synced up with search engines like Google and MSN almost immediately upon being launched. Through a couple of very interesting experiments I’ve learned that the best way to get your website listed on Google is simply to build it on a WordPress platform. And if you are running a business, geting listed on Google can be the difference between being noticed and going under.

Project Outline

What is needed to make this work? One major hurdle used to be the ability to put the standard blog front page on a sub page. This used to require quite a bit of coding, but in WordPress 2.3 and above it’s actually built into the main setup.

The next big issue is to get out of the standard header, body, footer layout scheme that all WordPress themes are built on. Although this feature is unneccesary in most cases, I can think of a dozen scenarios where you want individually styled pages with their own CSS backend and right now, that’s not something you can do right out of the box. I’ve been theorizing about this problem for some time and the solution appeared most unexpectantly at a session at MIX08 where the presenter to save time ignored the whole WP theme and built an external page with the loop calls inside it. It was a bit of an aha moment for me that you don’t actually need to stick to the rigid frame of WP, and although it is technically not correct to do so, if it makes my life easier, to hell with correctness.

Another question is to what extent one can use the Custom Fields to make styling changes in pages. I’d like to experiment and see just how far I can push this feature.

Finally, is it possible to make a non-WordPress site utilizing the WordPress infrastructure and database? In other words, can I build completely separate pages outside of WordPress and then use the loop calls etc to insert the required info in such a way that the site can be managed from the regular Admin panel without the client having any access to the controlling files. This final question is the crucial one because in the end what is needed is a manageable CMS that gives the client unlimited access to the content but limited or external access to styling, layout and other important files so that nothing can be “broken” by mistake.

The Future

In the coming weeks I’ll be launching two sites built on a WordPress as CMS v0.1 platform (pretty much stragith WordPress with some heavily customized themes) and once these are done I’ll dive head first into a major hacking project to see just how deep the rabbit hole goes. With any luck I’ll have a fully operational and customizeable CMS to use as a base for my client sites before the summer. In the spirit of cooperation I have every intention of blogging about all my findings and sharing the code and hacks with the online community. I’ll also blog further on how to modify WordPress blogs using Expression Web to help bring some beauty to the blogosphere.