Header Footer Script Adder

Description

Header Footer Script Adder is a powerful and user-friendly WordPress plugin that allows you to easily insert custom HTML, CSS, and JavaScript code into your website’s header, body, and footer sections. With advanced conditional loading options and per-page script overrides, you have complete control over when and where your scripts load.

Key Features

  • Three Script Locations: Add scripts to header (<head>), body (after <body> tag), and footer (before </body> tag)
  • Conditional Loading: Control where scripts load – sitewide, homepage only, posts & pages, or archive pages
  • Per-Page Overrides: Add page-specific scripts that work alongside global scripts
  • Syntax Highlighting: Built-in code editor with syntax highlighting using WordPress’s CodeMirror integration
  • Security First: All input is sanitized while preserving valid HTML, CSS, and JavaScript
  • WordPress Standards: Built following WordPress coding standards and best practices
  • Block Editor Compatible: Works seamlessly with both Gutenberg and Classic Editor
  • Performance Optimized: Minimal database queries and efficient script loading

Perfect For

  • Google Analytics and tracking codes
  • Google Tag Manager implementation
  • Custom CSS styles
  • JavaScript functionality
  • Meta tags and SEO scripts
  • Social media pixels
  • Chat widgets and customer support tools
  • A/B testing scripts
  • Custom fonts and external resources

Conditional Loading Options

  • Sitewide: Load scripts on all pages (default)
  • Homepage Only: Load scripts only on the front page
  • Posts & Pages: Load scripts on individual posts and pages only
  • Archive Pages: Load scripts on category, tag, and other archive pages only

Security & Performance

  • Input sanitization prevents malicious code injection
  • Capability checks ensure only administrators can modify scripts
  • Nonce verification for all form submissions
  • Minimal front-end performance impact
  • Clean uninstall process

Developer Friendly

  • Clean, well-documented code
  • WordPress coding standards compliant
  • Extensible architecture
  • Translation ready
  • Multisite compatible

Donations

If you find this plugin helpful, please consider supporting its development with a small donation. Your support helps maintain and improve this plugin.

Donate via PayPal: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ESSBBUCDBPAG2

Thank you for your support!

Privacy Policy

Header Footer Script Adder does not collect, store, or transmit any personal data. The plugin only manages the custom scripts you choose to add to your website. Any data collection would be dependent on the scripts you add, not the plugin itself.

Captures d’écran

  • Main settings page with global script configuration
  • Code editor with syntax highlighting

Installation

  1. Upload the advanced-scripts-manager folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Navigate to ‘Header Footer Script Adder’ in your WordPress admin menu
  4. Add your scripts and configure conditional loading options
  5. Save your settings

Manual Installation

  1. Download the plugin zip file
  2. Go to WordPress Admin > Plugins > Add New
  3. Click « Upload Plugin » and select the zip file
  4. Click « Install Now » and then « Activate »

FAQ

Is this plugin safe to use?

Yes! Header Footer Script Adder follows WordPress security best practices. All input is sanitized to prevent malicious code injection while preserving valid HTML, CSS, and JavaScript. Only users with administrator privileges can modify scripts.

Will this plugin slow down my website?

No. The plugin is designed for optimal performance with minimal database queries on the front-end. Scripts are only loaded when and where they’re needed based on your conditional settings.

Can I add different scripts to different pages?

Absolutely! You can set global scripts with conditional loading, and also add page-specific scripts when editing individual posts or pages. Page-specific scripts work in addition to global scripts.

Does it work with the Block Editor (Gutenberg)?

Yes! The plugin is fully compatible with both the Block Editor (Gutenberg) and the Classic Editor. You’ll find the « Page-Specific Scripts » meta box in both editors.

What types of code can I add?

You can add any valid HTML, CSS, and JavaScript code including:
– Analytics and tracking scripts
– Custom CSS styles
– JavaScript functions
– Meta tags
– External resource links
– Social media pixels
– And much more!

Can I use this on a multisite network?

Yes, the plugin is multisite compatible. Each site in the network can have its own script configurations.

How do I add Google Analytics?

  1. Go to Header Footer Script Adder in your WordPress admin
  2. Paste your Google Analytics code in the « Header Scripts » section
  3. Set the condition to « Sitewide » (default)
  4. Save your settings

What happens to my scripts if I deactivate the plugin?

Your scripts will stop loading when the plugin is deactivated, but all your settings are preserved. When you reactivate the plugin, everything will work as before.

How do I completely remove all plugin data?

The plugin includes a clean uninstall process. When you delete the plugin from WordPress, you’ll have the option to remove all associated data from your database.

Avis

13 mars 2017 1 reply
This is the reason I’m getting more and more frustrated with WordPress. Can’t add a simple <script> element to my site, without having to paddle through 5 lousy plugins… This plugin does fulfil its simple role (that I wouldn’t even need if WordPress had built in some elementary HTML customisation), but somehow decided that it’s appropriate to spam me and other admins with requests for donations on every dashboard page that we open – and I couldn’t disable this without deleting the plugin. Look, I understand you want to make some cash, but then please clearly mark this as freemium or make it a paid thing. This thing you’re doing now is just plain rude.
Lire l’avis

Contributeurs & développeurs

« Header Footer Script Adder » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.

Contributeurs

Journal

1.0.0

  • Initial Public Release