Docs
← Back to site

Custom Head/Body/Footer Code

2 min readUpdated November 21, 2026

WP Super Docs has a settings page for injecting your own HTML, CSS, and JavaScript into your docs pages, without needing a theme or child theme. It’s meant for things like analytics, tracking pixels, chat widgets, and small style or behavior tweaks scoped to just the docs section of your site.

Where it lives#

Go to WP Super Docs → Settings → Custom Code. There are five panes: CSS, JS, <head>, body open, and </body> footer.

The Custom Code settings tab with the snippet library and the CSS editor.

CSS#

Write plain CSS with no <style> tags needed. There are three separate fields:

  • Desktop: applies at all screen sizes
  • Tablet: automatically wrapped in a max-width: 1024px media query
  • Mobile: automatically wrapped in a max-width: 767px media query

JS#

Write plain JavaScript with no <script> tags needed. It’s output as a deferred script right before </body>, so it runs after the page’s DOM is ready.

Raw HTML output inside <head>. Use this for analytics scripts, custom <meta> tags, preconnects, or your own <style> blocks.

Body open#

Raw HTML output immediately after the opening <body> tag. The most common use is a Google Tag Manager <noscript> fallback.

Raw HTML output right before the closing </body> tag. Common uses include chat widgets like Intercom or Crisp, conversion pixels, and other deferred third-party scripts.

Who can edit this#

These fields require the unfiltered_html capability, which on a typical single-site WordPress install means Administrators only. If you’re logged in as an Editor or another role without that capability, the fields appear but are disabled, so you can see what’s saved without being able to change it.

Where it applies#

Everything you enter here only outputs on docs pages, not the rest of your site. Your theme’s own head/body/footer output elsewhere is untouched.

Was this helpful?

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only