Add Header and Footer Code
Add custom code to your site without modifying theme files.
Overview
Add custom code to your site’s header, body open, and footer without modifying theme files.
Injection Points
| Location | Hook | Priority | Use Cases |
|---|---|---|---|
| Header | wp_head | 20 | Meta tags, analytics, CSS |
| Body Open | wp_body_open | 20 | Tag Manager, no-script fallbacks |
| Footer | wp_footer | 20 | Tracking pixels, chat widgets, deferred JS |
Google Analytics 4 Integration
Built-in GA4 support with just a Measurement ID. Simply enter your G-XXXXXXXXXX ID and the tracking code is automatically added.
Automatic Skipping
Snippets are NOT output in:
- Admin pages (
is_admin()) - RSS feeds (
is_feed()) - REST API requests (
REST_REQUEST)
Developer Filters
Disable snippets on specific pages
add_filter( 'functionalities_snippets_output_enabled', function( $enabled ) { if ( is_page( 'landing-page' ) ) { return false; } return $enabled; });
For a step-by-step walkthrough, see How to Add Analytics or Verification Code Without Editing Your Theme.