Mike Little is waiting for us. He is wearing a T-shirt with a 'W' in a round circle on it. It's the unmistakeable 'W' that stands for WordPress, the publishing platform which revolutionised blogging and has influenced many a mainstream site. Little was the co-founder of WordPress and is proud of his creation. Then again, who wouldn't be?
“The Wall Street Journal, Ford, Sony, even BBC America ...,” he reels off. “They all run their sites on WordPress. I didn't even realise BBC America did that because in the UK they prefer homegrown software and don't like off-the-shelf tools. But they run the Top Gear blog in the UK using WordPress – it's the only one. I don't know how they got away with that.”
Little has an easy-going manner and he is passionate about WordPress and the world wide web. He describes WordPress's hobbyist beginnings that grew out of a blogging platform called b2 and how he offered to help Matt Mullenweg fork it to keep it going when its creator Michel Valdrighi disappeared. That led to WordPress launching in May 2003, which Little was actively helping to develop until 2005.
Little went freelance in 2008 and he set up zed1.com, a web development and consultancy company. He says WordPress development is his world, “a hundred per cent, that's all I do”. It means he's built up a lot of knowledge when it comes to the glaring mistakes developers make when using this most popular of platforms. Best of all, he's willing to share them with us.
WordPress is so changeable and developers work to better it each year. Yet Little senses some developers are failing to keep up and are sticking to the tried-and-tested methods, even when it's unnecessary. This causes them to fall into a trap of getting something to work without having done it the right way. “And that can lead them down some really dark alleys,” Little says.
He highlights themes that create an extra box on the Posts screen to add a URL of a thumbnail image. “WordPress has supported Featured Images for several years now and I still see new themes with that kind of functionality added to them. That’s just ridiculous.” he says.
He finds it a folly that a user, in such cases, has to upload images separately before copying and pasting the URL or the uploaded image and sticking it in a box just to create a thumbnail for a post. “Yet people are still doing that because it was the only way four or five years ago and they’ve not bothered to learn anything better.”
So is that down to laziness? “I think it’s laziness,” he answers. “To me it’s a non-professional approach to software development. I say that without necessarily meaning it to be a bad thing because I think most people working with WordPress are not professional developers so they haven’t got that discipline of trying to understand the right way to do things. But, because what they’ve done still works, they carry on.”
Little recommends that people who are building and designing sites with WordPress look at some of the skeleton themes that are out there such as _s rather than create a theme from scratch. “Or they can look at some of the frameworks like Genesis Framework by StudioPress. Using these mean you don’t have to get into a lot of PHP code and you can concentrate on the styling and so on because there’s a lot of functionality straight out of the box.”
For those who do want to create their own themes, though, he has some specific advice: be cautious about adding too much functionality to the theme itself. “One of the things that I’m seeing regularly, especially now I’m doing training classes and really meeting a lot of people who are new to WordPress, is that they get a theme that’s really attractive and does all these super fancy things as well as looks nice. But, at some point, they might decide on a different look and, because there’s so much functionality that has nothing to do with what the site looks like in the theme, when someone switches to another theme, half the stuff disappears. That could be the sliders, all the portfolio info they’ve put in there. And that shouldn’t be happening; that should be separate.”
Concentrate on looks
Therefore, it's important for designers and theme developers to concentrate less on packing stuff into a template and more on the look of the theme and the different platforms, whether that's mobile, tablet or computer.
“Yes, add features to do with presenting the data in nice ways and all the rest of it,” he says, “but don’t be adding shopping baskets or contact phones or anything like that in a theme. Such stuff belongs to plug-in territory. It might seem like a good idea to tie somebody into your theme but you don’t want to annoy them. The next time you bring out an even better theme your existing customers can’t change to it because they’ve invested so much in the original one.”
The key, he says, is to follow the general guidelines for WordPress themes, making sure that up-to-date API calls are used. By doing things the WordPress way, plug-ins can be used to make the theme behave differently and in ways that may not have initially occurred to the theme developer.
“So don’t even put the URL of your CSS file in your header,” he says. “You add it interactively with code using an API function so that somebody can override it or somebody can plug in and put it on a CDN. From there on, somebody can create a child theme and serve their own CSS file.”
He points to the rich wealth of APIs and support for building themes as well as plug-ins within WordPress and says it’s just about getting to know the software and learn what it can do. WordPress default themes nowadays, he adds, are written to be exemplar themes. They’re not necessarily all-singing and all-dancing but they try and do everything exactly the right way.
“They even do some things that might be a little over the top but to demonstrate the functionality that’s available in WordPress,” Little says. “It lets you learn how to build these things and how to compose so you’re not duplicating code. It pulls all your different pages, your different archives from your loop files and all that kind of stuff.”
But one of the problems is that developers will inevitably lack the time to learn. With lots of clients and a busy day, it can be difficult to keep up. “Maybe they’re more concerned with producing new and prettier themes,” he says. “But you then see the situation where you can’t install a plug-in that does something different with your post thumbnails because you’re not using the standard WordPress API and so the plug-in can’t change the way your theme behaves. I think that’s a shame. It disappoints people because they’ve picked a theme that actually restricts what they can do. I've seen themes where you install one of the well-known SEO plug-ins, for example, and half the stuff doesn’t work because the theme is not doing the right thing. Then people think the plug-in is no good.”
Little comes at WordPress from a development perspective and he likes to use the Genesis Framework because it allows the building of themes with minimal coding (“Your functions.php might have 20 or 30 lines of code in it and you’ve got a completely unique theme with all this functionality built in”). He tells us he needed to add a menu slot in the footer of a website he was developing and all it took was six or seven lines in functions.php. “I love the fact that that was so easy,” he says.
“I’ve actually customised off-the-shelf StudioPress themes for sites literally with a plug-in,” he says. “I’ve not even bothered creating a child theme or modifying one of their child themes. Just a few lines of code in a plug-in to modify the way the site behaves and an extra widget area, or moving a menu from below the header to above the header, just with a couple of lines of code.
"I think frameworks like that are really, really good. I like some of the WooThemes themes but I don’t like the fact the backend interface doesn’t work the same way as the rest of WordPress works. I know there are lots of other good theme companies out there. Ultimately, getting better with WordPress is all a matter of exploring, learning and keeping on top of things. Do that and you're on your way.”
Don't trust the web
Mike Little has a special warning when it comes to fishing around online for tutorials and resources on WordPress: be picky.
He says a lot of good and useful articles, advice and examples are now outdated because WordPress has moved on.
“In a lot of cases, you don’t have to write all this code out: there’s one function call you can make, and yet those resources are still out there and still featuring prominently in the searches. I have a rule of thumb that says if an article on how to do something in WordPress is more than a year old, it’s probably out of date and if it’s more than two years old it’s definitely out of date. And if it’s got code and it’s more than a year old it is absolutely out of date. It’s only half tongue-in-cheek, that.”