Joe Casabona is a freelance WordPress developer and author over at WPTuts+ and has just released a new book called "Building WordPress Themes from Scratch" which looks at taking an HTML / CSS design and coding it to be a WordPress theme. He also touches on more indepth subjects such as custom post types, theme option pages and plugin development. Joe provided me with a copy of his book and found it to be really well written, like a big tutorial on the subject - definately check it out if you are new to WordPress theme development or would like to use it like a reference manual. It's available as a paperback or eBook.
The book is split into the following main chapters ( with sub chapters for each) :
- Introduction - Covers who the book is for, some WordPress basics & Coding Conventions
- Converting HTML to a WordPress Theme - Includes a .PSD for a theme called "Director", this covers the conversion from HTML to WordPress
- Creating Custom Post Types - Goes over post types for a business directory (name, phone number, email, address etc)
- Creating a Theme Options Page - How to create a simple options page which controls - Change the logo, Insert Google Analytics code, Add social media buttons to the footer
- Plugin Development - How to create a contact form plugin
- Resources - Various recommended websites
I took this opportunity to ask Joe a few questions ...
Could you tell us a little about yourself ?
Sure! I hail from Middletown, NY and currently live in Scranton, PA working at my alma mater, The University of Scranton, where I am a web developer and faulty member. I also do freelance work in my spare time. I got into web development almost 10 years ago, when my parish offered to pay me to do a website. I had no experience at the time, but really enjoyed it and have been doing it ever since!
Whats your background with WordPress ?
My freshman year of college (2003-04), my friend Steve Mekosh introduced me to this new blogging platform called WordPress. I checked it out and really liked. From there I started to play around with it, implementing it on my own blog first then doing some pilot programs with clients. Around 2006-2007 I really started to push WordPress as a service since it was maturing, transforming from a blogging platform to a CMS. Now I do everything with WordPress, including simple installs, theme and plugin development, and have even deployed a few e-commerce sites using it.
I see you run your own agency, do you use WordPress exclusively for clients ?
Unless something really compells me not to, I will use WordPress. Usually if I don't it's because the client just wants a simple informational site that will never get updated or he/she already has a system in place that they prefer to use.
Could you tell us about the process of writing your book?
The process was pretty interesting, and at times took my back to things I learned in my HS English classes (hi Mrs. Lazarus, Mrs. Ross, and Mrs. Baird)! I first presented my editor at Rockable Press with an outline of what I wanted to write about and we went back and forth revising that a bit. Once we had the final outline, I went through, making each section of the outline a heading in my book. During that process, I decided I wanted to build a business directory since it hasn't been covered in other books; truth be told, it's also a sort-of side project I've wanted to work on.
When I really got into the nitty gritty- that is, the code- I would essentially code something myself to make sure it worked, and then explain what I did. It's the same approach I take when writing tutorials, which is why I feel the book reads like a long-form, multipart tutorial. While the design was provided for me by Rockable as a PSD, I still went through the software development process as well as the writing process. It was pretty interesting because I had to be very aware of why I was making the decisions I was making to properly explain them, even though I've done the same thing dozens of times before. --
It is sold on Rockable Press which is owned by Envato, how did you end up selling it there - did you approach them etc ?
The actually approached me; I write for Envato' WPTuts+ site and the previous editor, Brandon Jones, recommended me to Rockable when they asked him who a good candidate for the book might be. I cannot thank him enough for recommending me! It's been a dream of mine for a while to write a book and it's amazing that it has happened for me at 26.
Now that WordPress is becoming a more powerfull CMS, what future features or advances would you like to see ?
That's a very interesting question. I feel the best part about WordPress is how flexible it is; especially after Custom Post Types, you can essentially make WordPress any kind of CMS- not just one that manages posts and pages. I guess the biggest thing I'd like to see is a way to really test new themes on a WordPress install without disrupting the current theme/layout. In order to properly test a theme right now, you pretty much have to clone your current site, files, content, and all. However, I understand the amount of work that would go into that. For example, if you want to use a page template you would have to figure out how to apply a new page template without changing the current one. On the same token, I would also like to see some improvements to the importer, which doesn't always copy images over.
That said, WordPress has a very active community. I bet if I did some digging, I'd be able to find some sort of plugin or service that does both of those things!
What tools / software etc do you use when developing WordPress sites ?
Panic's Coda is my very best friend- there is even a WordPress syntax plugin thanks to developer Thorsten. The tool is amazing, with code complete (including WordPress functions), direct FTP and really tight integration with other programs. Both hosting companies I use, DreamHost and MediaTemple, have one-click install for WordPress, which makes my life much easier when setting up a new site.
Finally, I use my own homegrown framework when I'm developing a new theme. I have a four part series about it on WPTuts+ and I touch on it a bit in the book.
Any recommended resources for learning WordPress development ?
I feel the best resource for WordPress is the Codex: http://codex.wordpress.org. It's so incredibly well documented and thorough that you can find pretty much anything about the platform there. As far as recommended reading goes, .net magazine is the best publication for all things web development, and the cover WordPress. There is also a great book on WordPress plugin development called "Professional WordPress Plugin Development." The websites I visit most frequently are Wptuts+, Smashing Magazine, which has it's own WordPress section at wp.smashingmagazine.com, and wpengineer.com. I hear WPLift.com is pretty good too ;)
There are tons of resources out there no matter what stage of development you're at, so the best advice I can give is to see what's out there and what works best for you.