Taken from the add_action codex http://codex.wordpress.org/Function_Reference/add_action#Simple_Hook add_action('wp_head', function() { echo 'something';}) is supposed to work, it just makes my site die