WP PowerSuite
150+ modules in one suite — toggle only what you need. Zero runtime cost for features you leave off.
See Plans
On This Page
v 1.0.0
Last updated: 16/03/2026

Header & Footer Code

Add custom HTML, CSS, or JavaScript to the header and footerof your site. Ideal for tracking codes, analytics, and third-party scripts.

Overview

Header & Footer Code lets you add custom HTML, CSS, or JavaScript to the header (wp_head) and footer (wp_footer) of your site. Ideal for tracking codes (Google Analytics, Facebook Pixel), analytics, and third-party scripts. Simple text areas for header and footer. No need to edit theme files. Code is output on the frontend. Can exclude admin or specific pages if configured. Lightweight alternative to Code Snippet when you only need header/footer injection.

Who is this for?
Site owners who need to add tracking codes, analytics, or third-party scripts to the header or footer without editing theme files. Simpler than Code Snippet for basic use cases.

Features

Header Code
Add HTML, CSS, or JavaScript to wp_head. Runs before closing head tag.
Footer Code
Add HTML, CSS, or JavaScript to wp_footer. Runs before closing body tag.
Simple Interface
Text areas for header and footer. Paste and save. No complex builder.
Frontend Only (Optional)
Can be configured to output only on frontend, excluding wp-admin.

How It Works

1
Enable the Module
Go to WP PowerSuite, find "Header & Footer Code," and click the Enable button.
2
Add Code
Open the module settings. Paste your code in the Header and/or Footer fields. Save.
3
Verify
View your site frontend. View page source and confirm your code appears in the header or footer.
Performance Note
Minimal. Code is stored in options and output via wp_head and wp_footer. No extra queries. Keep scripts minimal for best performance.

Installation & Activation

1
Install WP PowerSuite
Make sure the WP PowerSuite plugin is installed and activated on your site.
2
Enable the Module
Go to the WP PowerSuite menu, find "Header & Footer Code" in the module list, and click the Enable button.
3
Add Code
Open the module settings. Add header and/or footer code. Save.
Requirements
PHP 8.1 or higher WordPress 6.0 or higher Permission to manage options (Administrator)

Use Cases

  • AnalyticsIntegration
    Google Analytics or other tracking codes
  • PixelTracking
    Facebook Pixel or other marketing pixels
  • ChatWidgets
    Chat widgets (e.g. Intercom, Drift)
  • CustomScripts
    Custom CSS or JavaScript snippets

Frequently Asked Questions

Troubleshooting

  • Code not appearing
    Ensure the module is enabled and you saved the settings. Check that you are viewing the frontend (not admin). Clear cache if using a caching plugin. Verify the code is valid (no syntax errors breaking the page).