Smashing WordPress

Beyond the Blog

Just to clear-up any confusion, Smashing WordPress is the 2nd book from German-based Smashing magazine - and has nothing to do with hacking WordPress sites, in fact the first chapter includes a couple of good ways to secure your WordPress installation.

Smashing WordPress teaches readers three things: how WordPress is organized, how to develop themes and plug-ins, and how to build sites with it. These points are covered in the five sections that make up the book: WordPress Essentials, Designing Themes, Plug-ins, Beyond the blog and WordPress toolbox.

The first section, WordPress Essentials, introduces readers to the WordPress platform. I'm calling it a platform here deliberately as most of this book deals with actually working with the API or at least getting down to the level of adding code to themes. The book starts off with a basic WordPress install and quickly gets into ways to making your blog more secure; the tips presented range from technical steps that can be applied to other non-WordPress sites, to some simpler things like removing the "generator" meta tag or not using the Admin account for everything as well as other tips about simple things to watch out for; remember their are several million copies out there running all kinds of well-known websites, so the baddies have lots of incentive to look for holes to exploit. The Essentials section finishes up chapters on the syntax of WordPress and an introduction to The Loop. The Loop is the main structure that controls how blog posts are displayed, I wasn't that familiar with it when I started reading this book, and found it is quite powerful: you can easily filter on topics, skip posts, stop and reset, all without writing any SQL code.

Sections two and three cover creating themes and plug-ins. It's in these sections where readers learn more about WordPress's API, introduced in the first section. WordPress would probably not be nearly as popular today if the developers hadn't early on designed it with an open API. This book is not a function-by-function listing of the API (the WordPress codex does that), but rather an overview with examples using the current 2.8 version of WordPress. Programming WordPress is probably a bit simpler than a general CMS, but it's still finding where everything is and how things are organized - nothing like spending an hour writing something custom, then find out there's a built-in function for that.

Once you're understanding how things fit together, chapters nine and ten show off some of the non-blog ways WordPress can be used. For someone like me who viewed WordPress as blogging software that could be hacked a bit to act like a more general CMS, these two chapters where an eyeopener. While there are certainly some applications where WordPress is more or suited to, and others where something like, say, Drupal might be an easier fit, it's worth reading this book for these two chapters, at the least you'll save yourself writing a plug-in or two.

Like many popular, long-running open source projects, there is a lot of resources available- the trick is figuring out which are current and what's good and bad. The last section on resources includes a list of plug-ins organized by the area they cover. With literally hundreds of plug-ins, many with similar-sounding names, developed over the years, this is probably a good starting point if you're new to WordPress.

The book's layout is good, with a number of charts, code snippets and screen-shots and plenty of examples, something that I wish the official WordPress codex had more of; however, the code samples are printed on either pink or yellow-ish background that's a bit hard to read -- reminded a bit of that old practice of printing software manuals on pink paper to foil photocopiers way back in the day before colour copiers where common. Fortunately, most of the listings are quite short.

By the end of the book readers are going to be familiar with the internal working of WordPress, will be able to at least have a starting point for developing their own themes and plug-ins, and know how to start building non-blog sites.

This is a good-looking book on how to bend and twist WordPress into getting it to work for you. It's not a book for beginning web designers as you need to be comfortable both with PHP -- more-so because of a few minor code errors (things like "function $hellomate(){..." ) that might cause some confusion for new designers -- as well as editing sites with a fair number of files to keep track of. Minor problems aside, there's a lot of good ideas with examples to back them up in this book. If you think of WordPress is just blogging software this book shows that a lot more is possible.

Published: 4th March, 2010

WordPress first arrived in 2003 and has gone on to be downloaded, according to Wikipedia, over 200 million times. Part of its appeal, beyond being easy to get set-up, is its flexibility. While the ability to theme WordPress with CSS and templates is well documented in several books, there is a whole programming interface underneath that can be used to get WordPress to do a lot more than serve-up blogs and this book provides some examples of how to do that.
Author: Thord Daniel Hedengren
Publisher: Wiley
ISBN: 978-0470684153


Related Reviews: