Skip to main content
Agency Program Hosting from 10% off. A dedicated account manager. Priority support. Built for growing agencies. Hosting from 10% off, a dedicated account manager and priority support for growing agencies. Speak to the team Join free
Header and Footer Scripts icon

Header and Footer Scripts

v2.4.2
by Anand Kumar · 4.6 (58 reviews)

Header and Footer Scripts plugin allows you to add scripts to WordPress site's and just before closing tag.

200K+ active installs Updated Feb 01, 2026 Tested to 6.9.12 Requires PHP 5.6
Try Demo Download
Pre-installed Ready in ~10s No card
Header and Footer Scripts

About Header and Footer Scripts

This plugin allows you to easily insert code, such as web analytics, social media scripts, and CSS stylesheets, into your WordPress website. It is compatible with WooCommerce and can be used to insert code into the header or footer of your site, as well as specific pages or posts. However, it does not support inserting or executing PHP code.

Screenshots

Header and Footer Scripts screenshot
Header and Footer Scripts screenshot

Frequently asked questions

What does the Header and Footer Scripts plugin do?
The Header and Footer Scripts plugin allows you to add scripts to your WordPress site's <head> and just before the closing </body> tag. It supports adding various types of code, such as web analytics, social media scripts, CSS stylesheets, and custom fonts.
Can I insert code into specific pages or custom post types?
Yes, you can insert code into the <head> of any single page or post. The plugin also supports inserting code into Custom Post Types.
What kind of code can I insert using this plugin?
You can insert HTML code, including JavaScript wrapped in <script> tags and CSS wrapped in <style> tags. The plugin does not allow you to insert or execute PHP codes.
Is this plugin compatible with WooCommerce?
Yes, the plugin should be compatible with WooCommerce.
What if the codes are not appearing on my site?
If the codes are not appearing, you can ask for support or check your theme files to ensure they have standard wp_head and wp_footer hooks.

Changelog

2.4.2

  • Fix: Resolved critical issue where scripts added to per-post meta box were not saving.
  • Fix: Corrected CodeMirror editor rendering (borders, height) and gutter visibility (line numbers) in meta box.
  • Improvement: Updated English copy throughout the plugin for better clarity and professionalism.
  • New: Added Hindi (hi_IN) translation.
  • New: Included language template (.pot) and translation files.

2.4.1

  • New Feature: Added “Clean on Uninstall” option to allow users to remove all data upon deletion.
  • Fix: Resolved issue where sidebar was not loading on settings page due to deprecated constant.
  • Improvement: Enhanced WPCS compliance with comprehensive DocBlocks and formatting fixes.
  • Improvement: Added strict sanitization to settings authentication to resolve Plugin Check warnings.

2.4.0

  • Internal: Refactored codebase to “Jamify HFS” naming standards (jamify_hfs_ prefix) while maintaining full backward compatibility.
  • New Feature: Added support for wp_body_open hook to insert scripts immediately after body tag.
  • New Feature: Added Syntax Highlighting for script editors in settings page.
  • Improvement: Modernized permission system to use ‘unfiltered_html’ capability.
  • Improvement: Added settings to allow Authors and Contributors to add scripts.
  • Improvement: Added admin notice for backward compatibility migration.

2.3.1

  • Security: Hardened nonce implementation with static action names.
  • Security: Added strict sanitization for access level settings.
  • Security: Improved input validation with isset() checks and wp_unslash().
  • Security: Replaced FILE menu slug to prevent path exposure.
  • Security: Added security warning for privilege delegation.
  • New: Added uninstall.php for clean database removal.
  • Fix: Added proper ABSPATH checks to all files.
  • Improvement: Added phpcs:ignore comments for intentional raw output.

2.3.0

  • Fix: Stored Cross-Site Scripting (XSS) vulnerability.
  • New Feature: Add minimum capability required to add scripts to posts.

2.2.1

  • Updated readme.txt.

2.2.0

  • New feature: Now set priority to sitewide script.
  • Fix: Monoscript font for text area.
  • Improved readme.txt.
  • Reverted to PHP v5.6 as many people can’t move to latest one.

2.1.1

  • Fixed a bug causing singular post type scripts to appear in archives.
  • Compatibility checked upto WordPress 5.2.2
  • Now require PHP v7.0 at least.

2.1.0

  • Support to Custom Post Type (CPT).
  • Improved ReadMe

2.0.1

  • Uniform Coding style.
  • Improved Translatable strings.
  • Fixed Links
  • Code Cleanup

2.0.0

  • Visual Improvements.
  • better directory structure.

1.3.4

  • Fixed variable undefined notice

1.3.3

  • Started using PHP5 style construct

1.3.2

  • Fixed https issue

1.1.0

  • Made for official WordPress Repo.
  • Added Single post Header script metabox
  • Minor Bug Fixes

1.0.0

  • Initial Public Release

Try other plugins

Yoast SEO icon

Yoast SEO

4.8 · 10M+ installs

Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using the Yoast SEO…

LiteSpeed Cache icon

LiteSpeed Cache

4.8 · 7M+ installs

All-in-one unbeatable acceleration & PageSpeed improvement: caching, image/CSS/JS optimization...

WooCommerce icon

WooCommerce

4.5 · 7M+ installs

Everything you need to launch an online store in days and keep it growing for years. From your…