Looking for a simple, flexible way to add custom HTML or JavaScript code to your WordPress site without touching your theme files? Meet Header Footer Code Injector, a powerful WordPress plugin that lets you inject code snippets into the header or footer, sitewide or per post/page – all from the admin panel.
✨ Plugin Features
🔹 Easy Code Injection:
Add any HTML or JavaScript snippet to the header or footer section of your website.
🔹 Scope Selection:
Apply code sitewide, or target a specific page or individual post.
🔹 Scheduled Snippets (NEW):
Set start and end times for snippets – perfect for limited-time scripts like ads, countdowns, or temporary announcements.
🔹 Snippet Manager Interface:
Edit or delete existing code snippets from an intuitive admin interface.
🔹 Code Editor (NEW):
A syntax-highlighted code editor (powered by CodeMirror) makes writing and editing code cleaner and more error-free.
🔹 Secure & Sanitized:
All user inputs are sanitized to maintain WordPress security standards.
🔹 No Theme File Edits Needed:
Zero need to edit your header.php
or footer.php
. Works seamlessly with any theme.
🆕 What’s New in Version 1.1
✅ Scheduled Snippets – Define date and time ranges for when a snippet should be active.
✅ Code Editing UI – Added syntax-highlighted editor for better readability.
✅ Edit/Delete Snippets – Manage your snippets easily from the admin panel.
✅ Better Admin UI – Cleaner layout with toggle dropdowns and scoped ID logic.
✅ Performance Optimizations – Lightweight and non-intrusive on the front-end.
⚙️ How to Set It Up
- Download the Plugin ZIP File (link below).
- From your WordPress dashboard, go to Plugins > Add New > Upload Plugin.
- Upload the ZIP and click Install Now, then Activate.
- Navigate to Code Injector from the admin menu.
- Fill in the form:
- Name your snippet
- Choose HTML/JS
- Set location (Header/Footer)
- Define the Scope (Sitewide / Page / Post)
- Optionally, set Start/End DateTime
-
Paste your code and click Add Code Snippet.
Done! 🎉 Your code will now be injected exactly where and when you need it.
📦 Download the Plugin
👉 Download Header Footer Code Injector Plugin (v1.1)
💡 Use Cases
- Add Google Analytics/Meta Pixels
- Show event banners for a limited time
- Inject structured data or schema scripts
- Add sitewide chat widgets
- Insert page-specific tracking codes
🚀 Ready to Upgrade Your Code Management?
Install Header Footer Code Injector and gain full control over your website’s header/footer behavior — with no coding knowledge required.