Add custom CSS, JavaScript, HTML and PHP to your WordPress site — site-wide or on specific pages — without touching your theme files.
Your code loads after every theme and plugin so it wins, and saving a snippet clears your page cache so changes show up straight away.
Version 1.1.0 · GPL-2.0+ · WordPress 5.8+ · PHP 7.4+ · By Nasibul Alam
WDD Custom Code Manager is a free WordPress plugin for adding custom CSS, JavaScript, HTML and PHP snippets from one dashboard — site-wide or on specific pages — without editing theme files or functions.php. Each snippet has its own switch, scope, device rules and priority, and loads after other theme and plugin code so it takes precedence.
It is built for site owners, agencies and developers who want tracking tags, style fixes and small customisations in one place that survives theme changes and updates.
One searchable dashboard replaces scattered functions.php edits, header and footer plugins, and theme customiser CSS boxes.
Six placement options in one place: CSS, JavaScript, and HTML for the head, body or footer — plus optional PHP — each in a syntax-highlighted editor.
CSS is written at the very end of the head and JavaScript at the very end of the body, after every theme and plugin hook has run.
Saving a snippet purges 19 caching layers, including WP Rocket, LiteSpeed Cache and Cloudflare, so edits show up right away.
Show code on desktop, tablet or mobile only, using breakpoints you set. CSS uses media queries; JavaScript uses width guards.
Apply a snippet to the entire site, or only to the posts and pages you pick with the built-in search.
Move snippets and settings between sites as one JSON file, in merge or replace mode.
From download to live code in five steps — no FTP and no theme file edits.
Download the plugin ZIP, then go to Plugins → Add New → Upload Plugin in your WordPress admin and activate it.
Open Code Manager → Add New, give it a title and choose a type: CSS, JavaScript, HTML head, body or footer, or PHP.
Use the syntax-highlighted editor. Write plain CSS or JavaScript — you do not need style or script tags.
Pick the entire site or specific pages, then limit it to desktop, tablet or mobile if you need to.
The snippet goes live immediately and your page caches are cleared automatically, so you can check the result straight away.
Themes and plugins print their own styles and scripts at different points in the page, so custom code added through wp_head or wp_footer is often overridden or delayed. WDD Custom Code Manager buffers the page and inserts your CSS at the very end of the head and your JavaScript at the very end of the body, after every other hook has run.
Inside your own snippets, a numeric priority sets the order — lower numbers load first. Each JavaScript snippet also runs in its own try/catch block, so one error never stops the rest.
Good to know: load order cannot beat selector specificity. If a theme rule uses a more specific selector, make yours at least as specific.
Saving, toggling, deleting or importing a snippet automatically clears your page cache. These caching layers are detected and purged for you:
Administrators are served uncached pages so you always see the latest code, and a Purge Code Cache shortcut sits in the admin bar. Using a host or CDN cache that is not listed? Hook your own purge onto the wdd_ccm_purge_page_caches action.
A quick reference for the plugin. The full guide covers every setting, hook and troubleshooting step.
WDD Custom Code Manager is a free WordPress plugin that lets you add custom CSS, JavaScript, HTML and PHP snippets from one dashboard, site-wide or on specific pages, without editing theme files or functions.php.
Yes. It is free to download and released under the GPL-2.0+ licence. The plugin has no licence keys or usage limits.
Install and activate the plugin, go to Code Manager → Add New, choose the CSS type, paste your styles, pick the pages or devices you want and save. The CSS is output in the head of your site and survives theme updates.
Usually a page cache is serving an older copy of the page. WDD Custom Code Manager purges 19 supported caching layers whenever you save a snippet, serves administrators uncached pages, and adds a Purge Code Cache button to the admin bar. If you use a CDN or host cache that is not supported, clear it once or hook into the wdd_ccm_purge_page_caches action.
Keep Force Highest Priority switched on, which places your CSS at the end of the head after all theme and plugin styles. If a theme rule still wins, it uses a more specific selector, so increase the specificity of yours.
Yes, but PHP snippets are switched off by default. When enabled they run on the server through eval() with full WordPress privileges, so only administrators can create them. Enable the option only if you trust everyone with administrator access, and review every snippet you save.
Yes. Choose Entire Site or select specific posts and pages, then limit a snippet to desktop, tablet or mobile using breakpoints you can change in Settings.
Yes. It detects and purges WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, WP Fastest Cache, Autoptimize, SiteGround Optimizer, Cache Enabler, Breeze, WP-Optimize, Hummingbird, Swift Performance, Nginx Helper, Kinsta, WP Engine, Pantheon, Cloudflare, Varnish and Elementor.
No. Snippets are stored in their own database table, so they are independent of your theme. Deactivating the plugin keeps them, but deleting the plugin removes them, so export a backup first.
Go to Code Manager → Export / Import, download the JSON export file, then upload it on the other site and choose Merge or Replace. Re-check any page-specific snippets afterwards because post IDs differ between sites.
Add custom CSS, JavaScript, HTML and PHP to WordPress in minutes, with code that loads last and changes that show up straight away.