The biggest reason many of us require to edit themes is to add JavaScript libraries, CSS codes or analytics tracking code. However, the problem with editing themes is that you will lose all your customization when you decide to change your theme or redesign it.
Most analytics software do provide users with plugins to insert code into themes, but why use plugins to insert simple HTML code into your theme? I have been using a very useful plugin called Footer Stuff (WP repo link) which allows me to add code to the header and the footer of the site without having to manually edit the theme.
The best part of the plugin though is the fact that it will insert the code into the theme no matter how often I change the theme without having to constantly edit the theme.
Footer Stuff Walkthrough
Head over to the plugins page in your admin dashboard and do a quick search for footer stuff, install and activate the plugin and you are ready to add code to your theme.
An option to personalize footer stuff is present under Appearance. Clicking on the Footer Stuff link will display a HTML form containing two text boxes. The box on the top is to add content to your footer, and the second one is to add content to your header.
Once you add the code you want, footer stuff will automatically insert it into your theme, no matter which one you use. However, your theme needs to make use of the functions wp_head() and wp_footer(), without which the plugin won’t work.
Overall I found the plugin to be very useful. Also considering that many people do not have the skills to edit HTML and PHP files, they can do away with several plugins by using this plugin, all you have to do is copy the code from the source and then add it to footer stuff.
Have you used this plugin before? If not, will you use it to simplify theme edits? Do let me know.
Nice…I’m going to have to try this. It’s such a pain to change themes. I typically do quite a bit of customization to whatever theme I’m using. This should help eliminate a little bit of that extra work I have to do every time I decide to change themes.
This the great things to add script trough plugin — we will never lost it when we change our blog theme.
This plugin sounds useful but hasn’t been updated in over two years. It only claims compatibility up to 2.6.5.
It might still work but I’m reluctant to use something that is no longer appears to be supported.
nice plugin..easily customizable.There is a similar plugin like this
Custom Headers and Footers
Great post. I used this plugin before. Nice one. I’ve even simplified the the stuff and created new one called “All in One Webmaster”. Just incase if you guys like: http://wordpress.org/extend/pl.....webmaster/
Thanks,
Arpit Shah
Couldn’t you make a new file in the directory of whatever you are using and just include it in the parts you want it?
Then if you get a new theme all your have to do is add icnlude()’s into your pages.
You can also use Custom Headers and Footers plugin. It allows not only to add code to blog head section and to blog footer, but also allows to add code before and after post lists (this includes pages which display single post).
Yeah that pluging is even better, thanks for sharing Daniel.
Curious why you’re featuring a plugin that has compatiblity up to WP 2.6.5 and was last updated 2008-12-22 per WP repo page.
@mercime – Usually the compatibility is not updated by the author. This plugin is a very simple one and did not require any major upgrade over time. I have been using it for a long time and continue to use it successfully on WP 2.9.1 setup and WP 2.9.2 setup.
However, you will find several additional alternatives to the plugin in the comments.
If a plugin works in the latest WP and older versions too… that’s a *really* good thing I think?
For others, there’s always the alternative suggested by Daniel, the plugin author of ‘Custom Headers and Footers’ above.
hmmm, sounds pretty similar to the Generic Stats plugin, which adds another little neat option as well.
AND has been updated recently 🙂 (and lissted on Mashable a couple of years ago)
I wonder who wrote it though… 😛
Hi guys!
Look at this plugin:
http://wordpress.org/extend/pl.....c-manager/
It can do all what `Footer Stuff` and `Custom Headers and Footers` can, but also:
insert php-code
insert code in widgets
select pages where to include code
hide code from admin users
Does it work with PHP code too? That’s normally what I add to my header and footer template files.
@Christopher – I think it would not work with php code
This is a really useful plug-in..will bookmark this and also will tweet about it. Thanks for sharing about this. I know a lot who are having issue with this.
some themes supported this function. but by using this plugin, we can be more flexible
Great Plugin, I’m Adding it to my blog now.