Add Code To Head
Add Code To Head
Description
Intended users: Template Designers, Developer
If you wish to add any custom HTML to the bottom of each page’s head, then this plugin is for you. For example, you can add some custom CSS, a link to an external javascript file or something else.
The problem with editing the template directly is if you ever update the template, your changes will be lost. This plugin works around this issue.
Acknowledgements
Plugin Icon (CC BY 3.0) by DeniShop
Installation
Via your Blog’s install plugin option
- Click the big ‘Install Plugin’ button in the plugin description window
Upload
If you have a single file (ending in “.zip”), then use this method.
- From the plugins, add new, click on the upload button
- Navigate to where the .zip file is located and select it
- Make sure to activate the plugin once it is installed
Files
If you have multiple files in a directory, use this method.
- Upload the entire directory (not just the files) to the
/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
Faq
Another plugin or the theme is adding their own codes to the head after this plugin runs.
Yes, but you may easily get confused and mess up your whole site. It is better to learn the code first before you use this plugin.
If you try to add a script or some other potentially-dangerous code (even if it isn’t), Wordfence might complain. Double check your code and if it is okay, mark it as a false positive in Wordfence.
Disable the plugin. If your site is still messed up, then there’s some other problem.
The problem lies in whatever you typed/pasted into this plugin’s option screen. If you’re really stuck, then try clearing out the code and starting over.
Similar to how widgets work, that data is stored in your database. If you made a backup before you deleted the data, then you can restore it that way, otherwise it is gone.
Right now you cannot. If there is sufficient demand, then we’ll add it.
Absolutely!
Reviews
Works flawlessly
By overneathe on May 22, 2017
works perfectly
By neerav on October 22, 2016
Changelog
1.17
- Tested compatibility up to WP 6.7.1
- Added note about Wordfence error that might be encountered
1.15
- Tested compatibility up to WP 5.7.2
- Reformatted script: converted tabs to spaces
1.13
- Tested compatibility up to WP 4.6.1
1.11
- Name changed to (hopefully) reduce confusion.
1.10
- Screenshot updated
- Compatibility with latest WordPress
1.09
- Readme file added
1.07
- Original release
