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.