Sorry, I meant from a template without editing a php file. That would work in a php file but not from a template, well, at least I can't get it to work from a template.
I've been trying to get help on this as well and no one seems to care. =P You are not able to put php directly into the templates. You are given two options. Create a php file that calls for a template aka the footer. Or you may create a plug-in that you'd put before or after the footer. I can't go too far into detail, but maybe that'll help you a little bit. I'm trying to put php into my header, but I'm not doing so well.
What exactly would I specify in the template then? How would I call for it?
I'm confused. I made a plugin with what you gave. I changed the source appropriately. Then what do I put in my header template to call for that hook? Do I need to create a new template? Please be detailed in your answer. I'd really appreciate it.