How I customized the Sandbox theme

09 Dec 2008

Two meta blog posts in a row is a sure sign of a blog in peril, but I'd thought I'd give Alastair a nod regarding customizing the Sandbox theme.

In brief

  • Customize the Sandbox theme via a child theme.
  • Use theme switcher if you want to modify and preview your theme in situ without impacting what the rest of the world sees.
    • I couldn't get Theme Switcher to work with child themes.
    • So I made changes directly to a full Sandbox theme, then turned those diffs into a child theme.
    • I had to turn off WP Super Cache.

Child themes

My last attempt at a custom theme resulted in a great deal of bit rot, so when looking for a new theme I really shied away from anything that required any maintenance effort on my part. I thought that meant I had to find a theme that meet all my functional and visual requirements at once -- seemingly a tall order.

Until I discovered child themes.

Great googamooga -- child themes for the win. I recommend reading through Demetris' How to make a “child theme” for WordPress post for all the gory details, but my resulting wp-content/themes/ directory looks like this:

  • themes/sandbox/ the standard Sandbox theme, unmodified. (Sandbox 1.6 as of this post.)
  • themes/sandbox-madbean/ my child theme.
  • themes/sandbox-madbean/style.css (copy as of this post).
  • themes/sandbox-madbean/functions.php an override to add my own footer (copy as of this post).

Some particulars:

  • I used display:none to hide sections I didn't want. In the past this is what would have prompted me to make a full custom theme. But I can live with just hiding the divs.
  • I hid the default footer, and used an add_action() in functions.php to add my own footer text.

Theme Switcher Reloaded

Demetris has another excellent post An easy style-switcher for WordPress on using Theme Switcher Reloaded. After disabling WP Super Cache, Theme Switcher Reloaded allows you to override the theme used in a session-sticky manner.

However, I couldn't get it to work with a child theme. So I developed my theme in a copy of Sandbox, then converted that diff to a child theme. <!-- WP Theme Credits -->

Jewelry online: gold and silver earrings.

Other Wordpress plugins

I use:

  • WP Super Cache. A nifty plugin that lazily caches your site so that Apache can serve it as static HTML.
  • Akismet comment spam plugin. Just awesome. As it says: Akismet has caught 359,483 spam for you since you first installed it.
  • Markdown syntax plugin.
  • Wordpress Automatic Upgrade makes upgrading to a new version of Wordpress easy. Apparently this will be a built-in function of Wordpress 2.7. This plugin obsoletes my previous method of easy upgrades.
  • Home
  • Blog