«all the ways i try to break wordpress»

for the obsessive theme switchers

I’m prepetually unsatisfied by themes. it’s not the theme authors’ fault, i’m just restless. alex king pointed to more advice: From Install to Pimped Out that sounds like the advice i found when i started using wordpress. but for anyone who does, or might, change themes, it’s wrong.

when you’re talking about meta tags, or feedburner RSS feeds, or custom title tags, you’re talking about things you don’t want to break when you change themes. and there’s no reason for them to. this is how i do it: i wrote a plugin.

Gasp! Shock! horror!
not really. if you can handle everything in the post above, you can handle this plugin. here’s how it starts:

<?php
/*
Plugin Name: archGFX Functions
Plugin URI: http://archgfx.net/
Description: all the things that i hack into themes, now they have their own file
Version: 1.0
Author: SunBurntKamel
Author URI: http://archgfx.net/
*/

you need to have a name, the rest of it’s optional.

so, all that fun stuff that you want to add to the head of your blog? dump it into a function:

obviously i have a few more things than average. google analytics scripts, geo tags, favicon, etc. you can call the function whatever you want, just remember it. now that we’ve got all our code, we need to insert it:

add_action('wp_head', 'archGFX_head');
?>

that’s it, save the file, activate your ‘plugin’, and you’re good to go. naturally, i do a few more things with this. i also handle my footer copyright notice the same way, with
add_action('wp_footer', 'archGFX_foot');

i add the mybloglog widget to my dashboard withadd_action('activity_box_end', 'archGFX_MBL');

and, i don’t have to worry about forgetting to add any of it next time i switch themes. the only thing that i don’t put in the plugin is my title tags. you can only have one of those. so while i could add mine with a plugin, i’d have to delete the theme’s title manually.