Free WordPress Plugin

WDD Custom Code Manager

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 plugin icon: orange and white code brackets on a dark rounded tile
Quick answer

What is WDD Custom Code Manager?

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.

At a glance

Plugin WDD Custom Code Manager Developer Nasibul Alam, WebDevDoer Latest version 1.1.0 Price Free License GPL-2.0+ Requires WordPress 5.8+, PHP 7.4+ Code types CSS, JavaScript, HTML (head, body, footer), PHP Cache support Purges 19 caching layers automatically
Features

Everything you need to manage custom code in WordPress

One searchable dashboard replaces scattered functions.php edits, header and footer plugins, and theme customiser CSS boxes.

CSS, JavaScript, HTML & PHP

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.

Loads last, so it wins

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.

Changes appear instantly

Saving a snippet purges 19 caching layers, including WP Rocket, LiteSpeed Cache and Cloudflare, so edits show up right away.

Device targeting

Show code on desktop, tablet or mobile only, using breakpoints you set. CSS uses media queries; JavaScript uses width guards.

Page targeting

Apply a snippet to the entire site, or only to the posts and pages you pick with the built-in search.

Export & import

Move snippets and settings between sites as one JSON file, in merge or replace mode.

How it works

How to add custom code in WordPress with WDD Custom Code Manager

From download to live code in five steps — no FTP and no theme file edits.

1

Install and activate

Download the plugin ZIP, then go to Plugins → Add New → Upload Plugin in your WordPress admin and activate it.

2

Create a snippet

Open Code Manager → Add New, give it a title and choose a type: CSS, JavaScript, HTML head, body or footer, or PHP.

3

Paste your code

Use the syntax-highlighted editor. Write plain CSS or JavaScript — you do not need style or script tags.

4

Choose where it loads

Pick the entire site or specific pages, then limit it to desktop, tablet or mobile if you need to.

5

Save — it's live

The snippet goes live immediately and your page caches are cleared automatically, so you can check the result straight away.

Load order

Why your custom code loads last — and wins

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.

Order of output on every page

1 Theme and plugin output in the head 2 Your HTML Head snippets 3 Your CSS — last thing in the head 4 Page content and other footer scripts 5 Your HTML Footer snippets 6 Your JavaScript — last thing in the body
Caching

Changes show up straight away, even with a caching plugin

Saving, toggling, deleting or importing a snippet automatically clears your page cache. These caching layers are detected and purged for you:

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 Elementor

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.

Documentation

WDD Custom Code Manager documentation at a glance

A quick reference for the plugin. The full guide covers every setting, hook and troubleshooting step.

Code types and where they load

CSS One style block, last in the head JavaScript One script block, last in the body HTML Head Inside the head, before your CSS HTML Body Right after the opening body tag HTML Footer Before the closing body tag, ahead of your JavaScript PHP Runs in the footer; switched off by default

Key settings

Force Highest Priority On by default. Writes CSS and JS after all other code. Auto-purge caches on save On by default. Clears 19 caching layers. Bypass cache for administrators On by default. You always see fresh pages. Enable PHP snippets Off by default. PHP runs through eval(), so enable it with care. Desktop breakpoint 1025 px and up (adjustable) Tablet breakpoint 768 px and up; mobile is below this (adjustable)

Developer filters and actions

wdd_ccm_css_output Filter — modify the merged CSS before it is printed wdd_ccm_js_output Filter — modify the merged JavaScript before it is printed wdd_ccm_html_output Filter — modify merged HTML for the head, body or footer wdd_ccm_render_snippet Filter — decide whether a snippet renders on this request wdd_ccm_should_buffer Filter — turn page buffering off for a request wdd_ccm_purge_page_caches Action — hook in your own CDN or proxy purge wdd_ccm_cache_flushed Action — fires after the snippet cache is invalidated wdd_ccm_updated Action — fires once after install or update
Release notes

WDD Custom Code Manager changelog

Version 1.1.0

10 October 2026 Latest
Fixed HTML Body snippets printing twice; edits not appearing until the page cache expired; custom code being overridden by plugins that load late; the database schema not upgrading on in-place updates. Added Force Highest Priority mode, automatic purging of 19 caching layers, an admin-bar Purge Code Cache button, an administrator cache bypass, per-snippet JavaScript error isolation and new developer filters. Changed Output now uses explicit buffer and hook modes, imports purge caches once, and deactivation clears cached output.

Version 1.0.0

Initial release
Added CSS, JavaScript, HTML and PHP snippets with page scope, device targeting, priorities, bulk actions, and JSON export and import.
FAQ

Frequently asked questions about WDD Custom Code Manager

What is WDD Custom Code Manager?

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.

Is WDD Custom Code Manager free?

Yes. It is free to download and released under the GPL-2.0+ licence. The plugin has no licence keys or usage limits.

How do I add custom CSS to WordPress without editing theme files?

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.

Why don't my custom code changes show on the front end?

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.

How do I make my custom CSS override theme styles?

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.

Can I run PHP snippets, and is it safe?

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.

Can I load code on specific pages or only on mobile?

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.

Does it work with caching plugins like WP Rocket or LiteSpeed Cache?

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.

Will I lose my snippets if I change my theme?

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.

How do I move my snippets to another site?

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.

Get WDD Custom Code Manager — free

Add custom CSS, JavaScript, HTML and PHP to WordPress in minutes, with code that loads last and changes that show up straight away.

Nasibul Alam

Nasibul Alam is a Certified WordPress Developer and Google SEO Expert

Nasibul Alam is a Certified WordPress Developer and Google SEO Expert. He is the Founder and CEO of WebDevDoer and a top-rated freelancer on Fiverr.