Header and Footer Scripts Plugin

Scope of the plugin Header and Footer Scripts Plugin.

WordPress Theme directory have thousands of awesome standard themes. And the makers of WordPress created a boundary line between theme and plugin. According to their latest post, Header and Footer Scripts and such feature should be in plugin territory.

A few days ago Chip Bennett posted:

Arbitrary Header/Footer Scripts: Themes must not provide Theme options for arbitrary header/footer scripts.

Arbitrary scripts are non-Theme-specific scripts added to the document head or footer to provide non-Theme-specific functionality. Such Scripts are Plugin territory, and pose a significant security risk if not handled properly. Custom CSS is acceptable, if properly sanitized.

It means Theme developer will not add these features to WordPress themes or the themes who strictly follows WordPress recommendations. However, there are plenty of great themes who do not follows many such things (it includes most premium supported themes). So, if you use such plugins then you probably do not need such plugins.

Download | Support (Free for early adopters) | GitHub Repo

Who should use this plugin?

This plugin is written for its simplicity so many most of you will get benefited. If your theme do not have functionality to add custom meta informations like rel=”publisher”, Google Analytics (or other web analytics scripts) or even post specific javascript or css all of this can be added by this simple lightweight plugin.

However, This plugin is not for Genesis Framework user or any other theme having such functionality. Also, If you need more (or less) features then there are other plugins available in the official WP respiratory. Currently, I don’t have any immediate plan to add more features.


The installation of this plugin is not different most of the plugins. You should navigate to your WordPress Dashboard --> Plugins --> Add New  and search "Header and Footer Scripts".

After Successful installation a sub-menu “Header and Footer Scripts” will be created under Settings. There will be two sections called Header scripts and Footer Scripts.

You may add as much as scripts you want (but don’t do so). The Header script will add all those scripts to <head> of every page. Whereas, the Footer Scripts will insert all the codes to wp_footer (or just before the closing body tag).

Quick tip: For optimal performance of your site it is recommended to add all CSS to head and JavaScript to footer.
Note: This plugin will not execute any php code.


Dashboard – Header and Footer Scripts Plugin
Compose Window – Header and Footer Scripts Plugin

Download & Support.

The plugin is will be supported on. Please do not ask any support related questions via contact form, but you are most welcomed to provide feedbacks, bug report via contact form. If you are a developer then you may patch the plugin at GitHub. I highly appreciate if you contribute towards the plugin.

Download | Support | GitHub Repo

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.