Design with WordPress in mind to begin with
If you can, ideally, know that you are going to use WordPress when you begin designing your site, then you may be able to take some precautionary steps to make creating your WordPress themes a bit faster when it comes to developing. Spend some time looking around the WordPress Dashboard and, especially, the different Widgets that come standard and what sort of Plugins you might want to add. Knowing what to expect will give you an upper hand in the end.
Don’t bother with the WordPress theme editor
The WordPress default install includes a theme editor, with the idea being that users can make modifications to the themes they are using and customize their blog. Updates are supposed to be on the way to the theme editor in WordPress 2.8, but for now things like syntax highlighting or advanced formatting features aren’t there. While the theme editor will come across as convenient, remember that it is intended for users, and not developers. You are a developer, and you need to create a different environment for your own work. Users may need to spend five or ten minutes in the theme editor. You are going to be spending hours creating your theme.
Use the right text editor
It’s no question that the one thing you’ll be using more than anything else when creating your themes will be your text editor. Take the time to find the text editor which fits your particular style. Pay particular attention to those text editors which allow for syntax highlighting, since the highlighting of different pieces of code will make it that much easier to cruise through and create what you need to create.
Use the right software
Your text editor is an important part of your theme development workflow, but it’s not the only application you’ll want to have around. Your web browser and FTP program are both important as well.
Having an FTP program is critical for developing on the web, especially if you want to work quickly with WordPress. Nothing will slow down your development more than sticking to the default theme editor, in your browser.
Devise your plan of attack before jumping in
There’s a common saying when it comes to discussing the virtues of well laid plans:measure twice, cut once. The cut itself, the work, is important enough that it’s worth spending twice as much time making sure it’s going to be correct.
When it comes to developing WordPress themes, there are so many ways to do it wrong, and relatively fewer ways, in each case, to get it right. While analyzing your design and determining just how to break your design apart for the HTML/CSS development, also take the time to consider just how your theme will operate. Some questions to consider:
- Is this content best served as post/page content, or through a widget?
- Is this functionality something I should build directly into the theme, or is it better suited for a WordPress Plugin?
- How best can I leverage the functions of WordPress to make as much of this dynamic as possible?
Begin at HTML/CSS, then move to WordPress
There are two paths when developing sites for content management systems (WordPress and others) that you can choose to go down. On the one hand, there are those who develop their website markup and styles directly into their theme, essentially building the front end code at the same time as adding the back end functionality.
On the other hand, there are those who swear by first creating a plain (read: static) HTML/CSS/JS site first, and then working the WordPress functionality into it afterward. By creating the static HTML version first, you can stay on your hard drive and not have to mess with uploading to the web quite yet. Developing soon-to-be-themes as HTML/CSS first allows to create the code as they should be, and then take the time to make WordPress fit the mold of the site, instead of the other way around.
Have a framework to start from
The word framework can mean a number of different things. A CSS framework is used to lay out your HTML content into a CSS layout quickly: A WordPress theme framework, though, is intended to speed up your theme development. The best thing is to create your own framework and use it on all of your themes.
Keep snippets of code close at hand
Odds are that as you develop your themes, using at least HTML, CSS, and PHP, you’re going to run across snippets of code that you will want to use over and over again. Rather than typing these bits out over and over again, why not save these snippets somewhere so they are always close at hand?
Limit the number of theme files you use
One of the easiest way to slow you up now, and end up complicating things down the road, is to create too many theme files for yourself to manage. In my case, I find the following theme files to be just the right amount I need to make the kind of theme I want:
- 404.php — you definitely want to keep your 404 page helpful
- archive.php — you can control all of your archive pages (posts by month, categories, etc.)
- comments.php
- footer.php
- functions.php
- header.php
- index.php
- page.php
- search.php
- sidebar.php
- single.php
- style.css
Bookmark useful WordPress theme related web pages
This one works in a similar way as the tip about saving code snippets listed above. There are always — always — going to be little things about WordPress that you are going to forget and need to look up. Rather than running a Google search for something over and over again (we’ve all done it) just keep a list of bookmarks handy.
Test your themes on a dedicated WordPress testing install
At some point you’re going to need to get your theme online and test it live, or at least live for yourself. There are a couple of ways to do this. One way is to create single test locations for WordPress themes. Another idea is to run a WPMU setup and create blogs on a whim to test for each project you run, to save yourself having to install WordPress over and over again.
Have content ready to test with
In order to make sure you are being thorough on any site you develop, you should fill it with content of all kinds, ideally using real content but alternatively using Lorem ipsum text. You have to be sure to use headings, blockquotes, lists, tables and every HTML element that seems appropriate, just to be sure you’ve got it all together.
Keep a list of your go-to Plugins
Much like the tip regarding test content above, having a list of Plugins that you always end up using hanging around can speed up your live testing.
I wouldn’t suggest keeping the actual downloaded files for Plugins in a folder somewhere, since they may be out of date unless you keep re-downloading them. You’re really better off just keeping a list of links (wherever you save things like links) to each Plugin so you can jump to them quickly when you’re installing them on your blog.
Recent Comments