Book Review: WP Theme Development Beginner’s Guide

Outside temperatures were scorching this past week, so it was a great time to stay inside, avoid the heat, and pick up a new book. As promised here’s my review of “WordPress Theme Development – Beginner’s Guide, Third Edition” by Rachel McCollin and Tessa Blakeley Silver published by Packt Publishing. I was happy for having taken the time to read the book as I picked up a couple of tips.

WordPress Theme Development, 3rd edition
WordPress Theme Development, 3rd edition

The language is a little wordy in places and sometimes extra commas interrupted the flow of reading, but overall the information in Chapter 1 filled the reader in on the basic technologies required for getting into WordPress theme development.

Two dozen links to external sources highlighted the breadth of technologies that must work together in creating beautiful WordPress sites. An appendix listing the required technologies and the many suggested external sources of information would have been helpful to the beginning theme developer.

Several links had to be copied and pasted as the hyperlinks in the PDF version of the book spanned more than one line and thus were broken when clicking directly. Still, the extraneous material found via these links were useful in understanding the material introduced in the first chapter.

If you’re familiar with using WordPress and CSS, and especially if you have at least some experience in installing WP and using a local server, Chapter 1 can be skimmed over as you’re most likely up to speed on this introductory material.

Chapter 2 is all about preparing a design for your theme using HTML5 and CSS3 to create a responsive design that is accessible to all and valid with respect to current Web standards.

I liked the approach of setting up the typography first before adding graphics and layout specifics as it helps to attain the desired ‘look and feel’ of the site. The emphasis placed on using ems as the units for font sizes is a good design practice.

Media queries are covered with respect to the CSS additions needed in order to create a responsive Web page design that will be seen in the best light independent of the size of the user’s screen. It would have been helpful to the reader to have a more complete description of each “version” of the site targeted by each media query instead of relying on a figure on page 30 that shows large, medium and small screen versions of the site.

The format of book is helpful in pushing the reader to take action, especially with the “Time for Action” headings that specify actions for the reader to take and the ensuing explanations under the “What just happened?” headings. Pop quizzes at the end of each chapter help the reader cement their new knowledge, too.

Chapter 3 addresses how to take an existing design and convert it into PHP and WordPress template files in order to create a functional theme. It covers how WordPress works and shows the flexibility of WordPress in using templates that present content in meaningful ways. The reader can follow the code examples and create their own working WordPress theme by the end of this chapter.

A general failing of the book is that graphics are not labeled, numbered or captioned in a meaningful way. For example, page 75 illustrates the template hierarchy rules that WordPress uses to display content and page 77 illustrates “the loop” (the same figure is repeated on page 86). Neither of these graphics that detail important WordPress concepts are identified with a caption. If they were, the figures could be identified in a separate table of contents so the reader could easily find the book’s illustrations for future reference.

Instead of relying on the figures or graphics to explain a topic, it would benefit the reader to have written text do the explaining. However, links are provided to the WordPress Codex where these concepts are described in detail. By not having descriptive text illustrate what’s important in each and every figure or screenshot, the text risks alienating people using assistive technologies. Screen readers will not be able to look at a figure and interpret it for the listener. Indeed, are well-sighted people interpreting the figure correctly? Text on the page should spell out the important bits so no one has to assume anything. I feel this is an area that PacktPub needs to improve upon greatly.

The text is interspersed with notes that share more information about topics that are introduced but not fully explained. Links to the WordPress Codex and other developer Web sites will be very helpful for readers who are just getting started with WordPress.

Chapter 4 briefly reviews some of the more important settings for WordPress sites that can be changed via the admin dashboard and how to call up those settings using templates and/or functions. It goes on to discuss advanced theme options and does a good job of introducing topics like using menus, featured images, sidebars and widgets in a WP theme.

Sidebars and footers are often the placeholders for widgets on WordPress sites. The theme created by following this book is a widget-ready theme. The process of identifying the areas that may be used to display widgets is called registering widgets, which must be done before specifying what content the widgets will contain. Making a theme to be widget-ready makes use of the functions.php file and the necessary steps to make it so are explained well.

The content in Chapter 5 concerning validation, debugging and browser differences, and the suggestion to validate early and often in theme development, was truly appreciated. Tools are highlighted that will make this job much easier for the budding theme creator. Steps are spelled out for creating an Internet Explorer-specific stylesheet, which is a great way to handle the different and bewildering ways that IE likes to render Web pages.

Chapter 6 reviews the steps to be followed for sharing your theme with other WordPress users, including creating a screenshot for inclusion in the theme package, packaging up your theme, and providing a proper license for your theme should you decide to share it.

Conditional tags and custom page templates are covered in Chapter 7. Steps are laid out for adding the Theme Customizer function to your theme which can be very helpful for other users of your theme. Tips are shared on how to handle SEO topics for your theme, such as using bloginfo() for pulling in site-specific information regardless of the site using the theme. The advanced tips shared in the last two chapters are important for creating a beautiful theme that just works.

Overall, I recommend this book to anyone unfamiliar with creating themes for WordPress. The language is understandable to a complete newbie and enough links to background or explanatory information are offered to get a new theme designer up-to-speed. By reading through this book and following along with the code examples, one can create their own WordPress theme in a timely fashion.

For those users who are familiar with creating WordPress themes the book, “WordPress Theme Development Beginner’s Guide, Third Edition” is still helpful by providing some advanced tips and tricks in creating WordPress themes.

WordPress Theme Dev Book Review Coming Soon

It’s been a pleasure seeing WordPress grow and grow and grow up over the years. I read a statistic the other day that stated 22% of the world’s Web sites are run by WordPress. Not sure how accurate that percentage reflects reality, but I wasn’t surprised that WordPress has become so popular. It has a lot to offer!

WordPress Theme Development, 3rd edition
WordPress Theme Development, 3rd edition

Using WP to run a website is fairly easy once you’re familiar with the back-end or admin screens. It’s open source software, so you know there’s a whole group of people out there willing to help you get it right.

Tons of plugins are available to make your sites work just how you see fit. Many, many themes are freely available that will make your site look its best.

To have your site stand out from everyone else’s you can modify its appearance by purchasing a premium theme. The alternative is creating your own theme, which can be as simple as taking one of the default themes and making a child theme to go with it.

If you’re new to theme development for WordPress, I’d suggest picking up a good book on the topic. Stay tuned… for later this week I’ll be posting a review of PacktPub’s “WordPress Theme Development – Beginner’s Guide” by Rachel McCollin and Tessa Blakeley Silver. In this guide the authors promise to help you learn how to design and build great WordPress themes.

Twenty Ten Child Theme Mods

Creating WordPress child themes is a slick way to make your own theme. All it takes are a few easy steps. Here’s an example using the standard Twenty Ten theme as the parent theme:

  • modify the child-stylesheet to make things look how you want
  • create child-directory for new child theme
  • add template files to child-directory, if you wish
  • upload child-directory to /wp-content/themes/
  • activate new child theme

The child-stylesheet must be saved with the name “style.css” in the child-directory. The child-stylesheet header (which has to be at the top of the sheet) must contain a few lines that identify its parent theme, like so:

You can add a line for the Theme URI: and Author URI:, if you like. Only the Theme Name: and Template: lines are required, the others are optional.

The @import rule indicates the directory of the parent theme and the location of the stylesheet. All you have to do is put in the new css rules below the import line.

That’s it!

If modifying the stylesheet doesn’t quite get all the changes you want, realize that you can add any template file to the child-directory and that will over-ride the parent file with the same name. For example, say you want to stick in a block for an advertisement right under the header image. Copy header.php and add a new <div> at the bottom of the page just below <div id=”main”> and stick the ad code in this division. Upload this new header.php into the child-directory and it will replace the one from the parent template.

Activate your new child theme and see how it looks!

Tips for Menus in WordPress Theme Development

WordPress
Image via Wikipedia

WordPress theme developers have a lot more help in 2011 compared to just a few years ago. With the publishing of the new standard themes and lots more interest in WordPress in general, there is a ton of info for you to soak up. Seek and ye shall find!

If you’re just starting to develop your own themes, get a good understanding of the Twenty Ten theme created by the WordPress team. You’ll learn a lot about how to put together your own theme by studying this standard theme that’s included when you download WordPress.

One of the advancements in WordPress 3.0 was the introduction of menus. To learn a bit about using the menus in your own theme, get a handle on how they’re used in the Twenty Ten theme. A great menu intro by Justin will start you on your way to understanding menus.

If you’re lost and don’t know where to start, look to the WordPress codex for help in getting started in developing themes for WordPress.