Skip to main content
Agency Program Hosting from 10% off. A dedicated account manager. Priority support. Built for growing agencies. Hosting from 10% off, a dedicated account manager and priority support for growing agencies. Speak to the team Join free
Add Code To Head icon

Add Code To Head

v1.23
by HBJitney, LLC · 5.0 (2 reviews)

(Formerly Add Text to Head) Add custom Javascript/HTML/CSS codes to the page head without editing the template.

2K+ active installs Updated Apr 23, 2026 Tested to 6.9.12 Requires PHP 8.0
Try Demo Download
Pre-installed Ready in ~10s No card

About Add Code To Head

This plugin allows template designers and developers to add custom HTML to the bottom of each page's head, such as custom CSS or links to external javascript files. It solves the problem of losing these changes when updating the template directly.

Screenshots

Add Code To Head screenshot

Changelog

1.21

  • Fixed bug that caused extra space to be added to head contents.
  • Code quality and best-practice pass. No database schema changes; existing saved code is unaffected.

1.19

  • Fix for CVE ID: CVE‑2025‑48314
  • Stored head code is sanitized for users without unfiltered_html, mitigating the cross-site scripting (XSS) issue for untrusted roles
  • Note: arbitrary code insertion on public pages remains intentional (and is the point of this plugin).

1.17

  • Tested compatibility up to WP 6.7.1
  • Added note about Wordfence error that might be encountered

1.15

  • Tested compatibility up to WP 5.7.2
  • Reformatted script: converted tabs to spaces

1.13

  • Tested compatibility up to WP 4.6.1

1.11

  • Name changed to (hopefully) reduce confusion.

1.10

  • Screenshot updated
  • Compatibility with latest WordPress

1.09

  • Readme file added

1.07

  • Original release

Try other plugins

Yoast SEO icon

Yoast SEO

4.8 · 10M+ installs

Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using the Yoast SEO…

WooCommerce icon

WooCommerce

4.5 · 7M+ installs

Everything you need to launch an online store in days and keep it growing for years. From your…

LiteSpeed Cache icon

LiteSpeed Cache

4.8 · 7M+ installs

All-in-one unbeatable acceleration & PageSpeed improvement: caching, image/CSS/JS optimization...