Theme Options

If you want to create a menu in wp-admin for Theme Options ( Appearance->Theme Options), you can start with this

Just download the zip file, search and replace “sample” of theme-options.php with your theme name.

in functions.php add

require_once ( get_template_directory() . ‘/theme-options.php’ );

then in your index.php ( and other template files) put the following at the top

$theme_options = get_option(‘sample_theme_options’);

For each include ( header.php, footer.php, sidebar.php, etc), do a

global $theme_options;

Then you can use $theme_options[‘option_name’]


CSS3 generator

This handy generator is great for CSS3 effects

You can use this to generate box-shadows to satisfy those pesky designers.


WordPress post formats

WordPress 3.1 introduces post-formats. You have to activate this “feature” and it gives you a new admin box in the posts type. Although this isn’t a big new feature, it is quite common for sites to have quotes, videos, links, etc. Loop retrieves the post-format for each post, you can then use that to style the post.

Here is the link to codex documentation.


Template Hierarchy

WordPress themes (templates) are the best in the business because its the easiest. The minimum requirement is 2 files: style.css and index.php. I usually start with style.css, index.php, header.php, footer.php and functions.php


Using SVN as a tripwire

Ok, don’t write to me about the ways to get around this security method, I get it. However, this is a cheap method for some easy security measures. Plus, using source control is what every programmer should be in a habit of doing. This also makes wordpress core updates very easy to do.

1) Create a repository and check in wordpress. Yes I realize wordpress already has a repository but this way you have the option to update when you are ready.

2) When you need to build a wordpress site, check it out from your repository.

3) When a new wordpress core version is released, you can update one of your instances and commit it back. You can then svn up all your instances.

4) use svn status to see what if any files have changed. If an exploit changed any wordpress core files, you will see a modification next to the file. Simply delete, svn up, and make sure you patch your source.


Chord pictures

I really like the concept of chord pictures. Much like learning chords on a guitar, its all about the shape of the hand. Forget about memorizing the notes of each chord or its construction, just see the shape of the chord. has a way to do this. Instead of remember in the root as the beginning of this shape construction, they recommend starting at the middle of the shape and putting the fingers as distance from the middle of the shape.

I’ll have to keep this in mind.