sandywp / plugins / header-and-footer-scripts

Header and Footer Scripts

4.6 out of 5 stars. 4.6 58 reviews

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

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v2.4.2 200,000+ installs WP 4.6+ PHP 5.6+

your-sandbox.sandywp.com/wp-admin
Header and Footer Scripts running inside a SandyWP sandbox

What you get inside

2 screens
  • Access this page from Dashboard --> Settings --> Header and Footer Scripts

  • This box will appear below the compose box on posts and pages. If not please refer to [our docs][4] if it's not there.

About this plugin

An essential WordPress plugin to easily insert scripts and styles (like Google Analytics, CSS, etc.) into your website’s header and footer.

Looking for a way to add Google Analytics, Facebook Pixel, or custom tracking code to your website’s header or footer?

Header and Footer Scripts is a simple yet powerful plugin that lets you inject code—such as Google Analytics, custom CSS, Facebook Pixel, and chat widgets—directly into your site’s header (<head>) or footer.

No bloat, no ads. This lightweight plugin simply does what it says: inserts code into your header and footer efficiently.

All you have to do is add the appropriate HTML code.

Don’t forget to wrap your code with proper tags.

<script type="text/javascript">
YOUR JS CODE HERE
</script>

Or for CSS:

<style type="text/css">
YOUR CSS CODE HERE
</style>

Why use this plugin:

  • Insert scripts globally into the header and footer of your entire website.
  • Supports all script types including HTML, JavaScript, and CSS.
  • Add specific scripts to the header of individual posts or pages.
  • To insert code to Custom Post Type [New Feature].

The plugin should be compatible with WooCommerce.

What it does not offer

  • You can’t insert/execute PHP codes.

Almost all WordPress themes support this “Header and Footer Scripts” plugin. If the codes are not appearing in your site [ask for support] or look at your theme file if they have standard wp_head and wp_footer hooks.

Important Links

For further information you are welcomed to follow these links:

Questions

Q. How could I access support and troubleshoot problem?

A. I couldn’t handle wp.org forums on regular basis. You are suggested to visit GitHub Wiki for more updated plugin documentation and troubleshoot your problem.

Q: Is there any paid version of the plugin available?

A. Nope, There is none. If you need more feature send us feedback or feature request.

4.6

58 reviews

  • 5 ★ 48
  • 4 ★ 1
  • 3 ★ 4
  • 2 ★ 3
  • 1 ★ 2

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

  • Header Footer Code Manager

    4.9 · 600K+ installs

    Easily add tracking code snippets, conversion pixels, or other scripts required by third party services for analytics, marketing,…

  • Insert Headers And Footers

    5.0 · 300K+ installs

    Include inline javascript, stylesheets, CSS code or anything you want in Header and Footer areas of your WordPress with ease.

  • Head, Footer and Post Injections

    4.9 · 200K+ installs

    Head and Footer plugin lets you to add HTML code to the head and footer sections of your site pages, inside posts... and more!

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.