I recently found out about Ozh’s Theme Toolkit, so thought I would give it a go with a theme I am messing with. Essentially it allows you to add features that are them administered through a page within the WordPress back-end.

It only took about 3 hours to get it working, but I finally achieved my goal1:

function theme_titleswitch() {
	global $mytheme;
	if ($mytheme->option['title'] == 'Option1') {
    echo '<div id="title">
    <a href="' . get_settings('siteurl') . '">' . get_settings('blogname') . '</a>
    </div>';
    }
}

As for what it does, it allows a WP administrator to turn the title on and off via a radio button. Not exactly earth-shattering technology but it allows presentation to be altered without hacking, and I wrote it.

I would like to see a repository somewhere for these user-created functions, which would avoid the need to roll-your-own every time.

1 The solution came of course just as I decided to post for help.

Posted in Themes | Tags: ,  |