Add to Header
2010-01-16 @ 14:49The problem
If you need to add a stylesheet, a javascript file or Google Analytics code you normally need to edit your theme header.php file. If you do that your changes will be overwritten if you upgrade your theme.
The plugin
In short
- Birth date: 2009-08-15
- Last updated: 2009-08-15
- Version: 1.0
- Tested with version: 2.8
- Requirements: PHP5
Download
- Download from: devdevote.com
- Download from: wordpress.org (coming soon)
Benefits
Add additional code to your header WITHOUT editing your theme:
- Stylesheets (CSS)
- Javascript (JS)
- Google Analytics
- Metadata
- Anything else
Example usage
- Change your downloaded theme visually without changing it, by adding an extra stylesheet. If you update your theme your changes will still be intact.
- Add Google Analytics without changing your theme. If you update or change your theme, Google Analytics will still be there.
Screenshots
Installation
- Upload the FOLDER ‘add-to-header’ to /wp-content/plugins/.
- Activate the plugin ‘Add to Header’ through the ‘Plugins’ menu in admin.
- Go to ‘Settings’ and then ‘Add to Header’ to add header code.
Changelog
- 1.0 – Initial release.
Known issues
None reported so far.
Possible future features
- Add footer code through wp_footer().
- Add shortcodes to insert code within posts / pages.
- Add multiple codes to header, footer and shortcodes.
- Add functions to themes to add code.
- Add PHP code.
Contribute
- Report bugs.
- Report if it works with other versions with WordPress.
- Spread the word. Blog about it, tell your friends, link to this page and so on.







2009-08-16 @ 12:24 e m
Works great, thank you
2009-08-19 @ 12:35 e m
Can you allow us to add PHP code into the Header via this plugin ?
I’d want it to be the code executed prior to the tag in the header.
2009-09-02 @ 1:36 e m
I am trying put the photo that is in my sidebar into the header but when I use this plugin, the photo doulbes ie its put 2 there, it duplicates them, any idea why this would be?
2010-01-17 @ 2:15 e m
I have no idea. The plugin just takes the code written in the textbox and add it to the header through the function wp_head. Check the code again to see if you have written the code two times by mistake?
By the way, text and photos should not be between the head-tags. It should be somewhere between the body-tags. Scripts, CSS, metadata and so on are head-stuff. Images are not.
2010-01-10 @ 2:50 e m
Great! It’s working on the WP-v2.9.1… Thanks.
2010-05-21 @ 5:14 e m
This works wonderfully, thanks! But I’m curious…the default placement of an added chunk of code is in front of/above the current header. I’m wondering if there’s a way to place the code directly after the current header…a blog-wide subhead as it were. Something between the header and the content.
2010-08-30 @ 9:12 e m
Great idea and serves a real need but wondering if there is a way to have it load after all other plugins so my style include could overwrite previous includes without me modifying their code or my own header file directly. Maybe this is more of a plugin load question…
2010-08-30 @ 9:32 e m
…in response to my previous comment, i see that plugin order is determined by plugin name (alpha ordered) so renaming to z_ + name fixed it for me. thanks again for your helpful plugin!
2010-10-14 @ 5:20 e m
Any chance you know of an ”add to footer” plugin (or would write one)? It’d be cool if this plugin allowed you to add to the header and the footer in the same plug. Nice work.
2010-10-31 @ 5:45 e m
Hi, I like your theme… did you purchase it or is it unique? I am in search of a theme like this for my website but haven’t discovered anything as nice as this.
2011-02-03 @ 5:59 e m
[...] Translate Widget für WordPress »Add to HeaderPubliziert 19. Februar 2010 | Von khkAdd to Header von devdevote.com fügt über eine Textbox im Adminbereich beliebigen Code in den Header des Blogs [...]
2011-04-13 @ 2:25 e m
Thanks for this post. It is very useful and time saver.
2011-05-26 @ 9:25 e m
This plugin is not working in WP 3.1.2
2011-06-19 @ 11:15 f m
Works fine in WordPress 3.1.3. !
Great Job, you’ve done here, Thank you !
2011-07-06 @ 12:53 e m
How do we remove the added code ?
2011-07-17 @ 12:35 f m
[...] second one and the one I am using now is Add to Header. It is fantastic and even though developed long ago, still compatible. He did a great [...]
2011-07-20 @ 6:19 e m
Trying to use this with my site and I’m not seeing a ”settings” link by the plugin. Any idea why this might be?
2011-08-08 @ 6:13 e m
Jens,
Nice work, IMHO.
Question: If I have already created a header.php file in my child theme, will ATH put its code there or in the WP header.php file? Or, is there a way to direct the plug-in to a specific header.php location?
Thank you for your time and attention.
Best,
don
2011-08-17 @ 11:19 e m
I added my banner java to the add to header plugin, but is there anyways I can get the banner to display directly below the header image and menu, and above the content?