Thord Daniel Hedengren - Smashing WordPress_ Beyond the Blog-Wiley (2014)

(avery) #1

112 PART II • Designing and Developing WordPress Themes


basis for commercial projects. It is important to pay attention to the license for any theme you
choose because you want to be able to use your basic starter theme any way you like without
paying for every setup. If your starter theme of choice is a commercial theme, there is most
likely a developer’s license that gives you these rights, but if you’re reading this book, chances
are you’re better off spending some time creating your very own starter theme.

Should you not want to use an existing theme, you can create your own basic starter theme
from scratch (or copy and paste your way, with sensibility of course). This means that you’ll
get everything the way you want it, but it does take some extra time because you’ll be doing
all the work. Chances are you’re interested in that sort of thing, though, because you’re
reading this book!

So what should your starter theme do? Well, everything you think you need on a regular
basis, and absolutely nothing more. The last thing you want is a bloated starter theme that
may look good in itself, or perhaps suit one kind of WordPress site, but be entirely overkill for
others. It is a better idea to keep an extras library with stuff you won’t need all the time, from
custom code to small code snippets and template files, and deploy these things only when
needed. After all, you want the final theme to be as tight as possible, without being hard to
maintain.

To sum up:

◾ Analyze your needs and set up a basic starter WordPress theme based on those needs.
◾ Use an existing theme framework, if possible, to save time.
◾ Pay attention to theme licenses!

Say you’re the generous kind and want to share your brilliant starter theme, or a variant of it at
least, with the general public. Good for you; that’s very much in line with the open source
spirit. But if you’re gonna do it, then make sure that you do it right!

RELEASING A THEME


The WordPress community always appreciates the release of a new theme. The official theme
directory offers theme installation from within the WordPress admin interface, which makes
it all the more interesting to host your theme there. That way, the WordPress site will also
make sure that sites use the latest version of the theme or offer users the option to upgrade
automatically through the admin interface. That is assuming you keep your theme up to date
in the directory, of course.

When you release a theme, it should, of course, be fully functional, preferably validated, and
not a complete copy of someone else’s work. See the following theme checklists for more
details on what you should consider before releasing your theme.

It may be tempting to sell your theme. Commercial (or premium, as they are sometimes
called) themes are a reality, and there are licenses for sale with support programs, as well as
other solutions that work around the GPL license that WordPress carries. Why should that
Free download pdf