Add Custom Code to Any Page.
Let AI Write It.
Inject JavaScript, CSS, and PHP snippets on specific pages or globally across your WordPress site. Describe what you need in plain English - AI generates production-ready code in seconds. Three-stage PHP sandbox keeps your site safe.
$10-$15 per site · AI generation uses NitroShock credits · JS & CSS injection is free
Features
Everything you need to manage custom code
Three Code Types
Full support for JavaScript, CSS, and PHP. Add tracking scripts, custom styles, or server-side logic - all from one interface.
AI Snippet Writer
Describe what you want in plain English. AI generates production-ready JS, CSS, or PHP - including WordPress hooks and best practices.
PHP Sandbox Safety
Three-stage validation: syntax checking, dangerous function scanning, and isolated sandbox execution. Errors auto-deactivate the snippet.
Page-Specific Targeting
Target the homepage, specific pages, or individual posts. Select multiple targets per rule. Global snippets run site-wide.
Header & Footer Control
Choose where global scripts load. Header for tracking pixels and styles, footer for analytics and non-blocking scripts.
Safe Mode
Something go wrong? Add ?nitrosnippets-safe-mode=1 to any admin URL to pause all execution instantly.
Code Types
Three languages. One workflow.
Client-Side Scripts
- Analytics and conversion tracking
- Chat widgets and popups
- Custom interactions and scroll effects
- Third-party embed codes
- A/B testing scripts
Custom Styles
- Page-specific style overrides
- Theme customizations without child themes
- Hide or show elements per page
- Custom fonts and typography
- Responsive layout adjustments
Server-Side Logic
- WordPress action and filter hooks
- Admin bar and login customizations
- Dynamic content injection
- WooCommerce checkout modifications
- Custom shortcodes and functions
PHP Sandbox
PHP execution
without the risk
Other code snippet plugins let PHP run unchecked. NitroSnippets validates every PHP snippet through three stages before it touches your live site. If anything goes wrong, the snippet is automatically deactivated.
40+ dangerous functions blocked, including exec, eval, file_put_contents, shell_exec, superglobals, and more.
Syntax Validation
Runs php -l to catch parse errors before the snippet is ever saved.
Dangerous Function Scan
Scans for blocked functions, backtick execution, variable variables, and raw superglobal access.
Sandbox Execution
Activates the snippet and makes an isolated test request. If the server returns a 500, the snippet is auto-deactivated.
AI Snippet Writer
Describe it. Generate it. Done.
1 credit per AI generation · Works for JavaScript, CSS, and PHP
Getting Started
Up and running in two minutes
Install the plugin
Upload the zip via Plugins → Add New → Upload Plugin. Activate it. NitroSnippets appears in your admin sidebar.
Activate your license
Enter your NitroShock license key in the license bar at the top of the NitroSnippets admin page. JS and CSS injection works without a license - the key unlocks AI generation and PHP execution.
Add a snippet
Choose Global (runs everywhere) or Page-Specific (target individual pages or posts). Select your code type, paste or write your code, and save.
Or let AI write it
Open the AI Snippet Writer, describe what you need in plain English, pick JS/CSS/PHP, and hit Generate. Copy the result into your snippet - or refine your prompt and regenerate.
Manage and toggle
Every snippet can be activated, deactivated, or deleted with one click. PHP snippets show sandbox errors inline if anything went wrong during validation.
Start adding custom code today
Free to install. JS and CSS injection included. Activate a license to unlock AI generation and PHP execution.
Compatible with all major WordPress setups