Add Code To Head
by salubrio 5 (2 reviews)

Add Code To Head

Add custom JavaScript/HTML/CSS codes to the page head without editing the template.

Add Code To Head ranks #4,218 among WordPress.org plugins with 3,000+ active installations, is #601 of 8,547 in the Customization category, a 5/5 rating from 2 reviews, and was last updated Apr 23, 2026. Data from WordPress.org, refreshed twice daily — see methodology.

Tested up to WP 6.9 (Current: 7.1)
v1.23 Current Version v1.23
Updated 4 months ago Last Update on 23 Apr, 2026
Refreshed 9 hours ago Last Refreshed on
#601 of 8,547 in Customization Top 10% by installs
View on WordPress.org
Rank
#4,218
-17 this week
Active Installs
3K+
-20.5%
KW Avg Position
42.3
No change
Downloads
41.3K
+10 today
Support Resolved
0%
No change
Rating
100%
Review 5 out of 5
5 (2 reviews)

Next Milestone 4K

Total Progress 76.8%
3K+ 4K+
570
Ranks to Climb
-
Growth Needed
8,000,000
Active Installs
Pro

Unlock Exact Install Count

See the precise estimated active installs for this plugin, calculated from real-time ranking data.

  • Exact install estimates within tiers
  • Track install growth over time
  • Milestone progress predictions
Upgrade to Pro
Need 232 more installs to reach 4K+

Rank Changes

4,199 4,205 4,211 4,217 4,223 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026
4,197 4,204 4,210 4,217 4,223 01-09-2026 02-09-2026 03-09-2026 04-09-2026 05-09-2026 06-09-2026 07-09-2026 08-09-2026 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026
Current #4,218
Change
Best #

Upgrade to Pro

Unlock 30-day and 90-day rank history charts with a Pro subscription.

Upgrade Now

Active Installs Growth

Active Installs 0,000,000+
Growth +0.0%
Peak 0,000,000

Downloads Growth

10 20 30 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026
10 20 30 01-09-2026 02-09-2026 03-09-2026 04-09-2026 05-09-2026 06-09-2026 07-09-2026 08-09-2026 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026 16-09-2026
Downloads
Growth
Peak

Upgrade to Pro

Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.

Upgrade Now

Reviews & Ratings

5.0
2 reviews
Overall 100%
5
2 (100%)
4
0 (0%)
3
0 (0%)
2
0 (0%)
1
0 (0%)

Security History

Source: WPVulnerability

1 known vulnerability on record · 1 in the last 24 months · checked 1 month ago

  1. Add Code To Head [add-code-to-head] < 1.23

    CVE-2025-48314 · Fixed in v1.23

TL;DR

AI summary of the plugin's readme

This plugin is for template designers, developers, and admins who need to add custom code to a site's page header. It lets users insert JavaScript, HTML, or CSS into the head section—such as site verification codes for services like Mailchimp or Google—without editing the template directly.

  • Add custom JavaScript to head
  • Add custom HTML to head
  • Add custom CSS to head
  • Site ownership verification codes
  • Link external JavaScript files
  • No template editing required
  • Unaffected by template changes

Frequently Asked Questions

Common questions about Add Code To Head

The plugin now normalizes and sanitizes saved head code for users who do not have the unfiltered_html capability before it is stored, closing the stored XSS vector described in CVE-2025-48314 for untrusted roles. Site owners who intentionally grant unfiltered_html (such as administrators on single-site installs) still bypass this sanitization by design so they can insert arbitrary code. Bottom line: the vulnerability of executing arbitrary code in the admin screens should be eliminated, however the functionality exists for public pages and is intentional. Only advanced users who know what they are doing should use this plugin.
Another plugin or the theme is adding their own codes to the head after this plugin runs.
You can, but you shouldn't. It is far too easy to break your site if you don't know what you are doing. Q. Wordfence says something like "A potentially unsafe operation has been detected in your request to this site." If you try to add a script or some other potentially-dangerous code (even if it isn't), Wordfence might complain. Double check your code and if it is okay, mark it as a false positive in Wordfence. Q. Help! I messed up my whole site! Disable the plugin. If your site is still messed up, then there's some other problem.
The problem lies in whatever you typed/pasted into this plugin's option screen. If you're really stuck, then try clearing out the code and starting over. Q. Help! I accidentally erased the code and I didn't mean to do that. Similar to how widgets work, that data is stored in your database. If you made a backup before you deleted the data, then you can restore it that way, otherwise it is gone.
Right now you cannot. If there is sufficient demand, then we'll add it.
Absolutely!

Sign In / Register

You need to sign in or register to use this feature.