Header & Footer Snippets

  • JNext lesson
  • KPrevious lesson
  • FSearch lessons
  • EscClear search

Overview

Add custom code to your site without modifying theme files.

Injection Points

  • Headerwp_head | 20 | Meta tags, analytics, CSS
  • Body Openwp_body_open | 20 | Tag Manager, no-script fallbacks
  • Footerwp_footer | 20 | Tracking pixels, chat widgets, deferred JS

Google Analytics 4 Integration

The module includes built-in GA4 support requiring only a Measurement ID. Users enter their G-XXXXXXXXXX ID and tracking code deploys automatically.

Automatic Skipping

Snippets do NOT output in:

  • Admin pages (is_admin())
  • RSS feeds (is_feed())
  • REST API requests (REST_REQUEST)

Developer Filters

Conditional Output Control

add_filter( 'functionalities_snippets_output_enabled', function( $enabled ) {
    if ( is_page( 'landing-page' ) ) {
        return false;
    }
    return $enabled;
});

This filter allows developers to disable snippets on specific pages.