Temper

Temper vs Code Snippets

Code Snippets runs small pieces of PHP from the database. Temper edits whole themes and plugins. How they differ, and when to use each.

Code Snippets is a plugin for adding custom code to a site without editing theme files. You write a snippet in wp-admin, choose where it runs (everywhere, only in the admin, or only on the front end), and turn it on or off. Snippets are stored in the database, separate from your theme. The free version handles PHP snippets and HTML content snippets you place with shortcodes; Code Snippets Pro adds CSS and JavaScript snippets, revisions, display conditions, an AI agent and cloud features.

Temper edits the files of your themes and plugins. You work in a private working copy, preview it on the real site, and publish it with a snapshot you can roll back to.

If what you need is a function hooked to a filter, or a few lines that shouldn't depend on the theme, Code Snippets is the simpler tool. Temper is for when the code is a theme or plugin: templates, theme.json, blocks, patterns, or a plugin with several files.

At a glance#

Code SnippetsTemper
What you editIndividual snippetsTheme and plugin files
Where code livesDatabase tablesTheme and plugin folders
Free versionYes, on WordPress.orgYes, from temperwp.com
PHPYesYes, in any theme or plugin file
CSS and JavaScriptPro snippetsYes, as theme or plugin files; Pro adds Tailwind, Sass and esbuild builds
Run once, admin only or front end onlyYesNo, code runs as the theme or plugin runs it
Recovering from a broken snippet or fileSafe Mode stops snippets runningChecks on every save; publish rolls back if it broke the home page
Preview before visitors see itNot listedYes, only for you
HistoryRevisions, in ProLast publish free; every snapshot with Pro
AIAI agent, in ProAI chat with your own key, free; MCP for Claude Code and Cursor with Pro
GitNot listedPro: GitHub and GitLab

Snippets and files#

Code Snippets runs each active snippet for you. That keeps small changes tidy: each one has a name, tags and an on/off switch, survives a theme switch, and can be exported and imported on another site. It can also export a PHP snippet as a standalone PHP file that works without the plugin.

Temper doesn't run code itself. It edits a theme or plugin, and WordPress loads it the usual way. That fits code with structure: a block theme's templates and parts, a block with its block.json, or a plugin with classes, assets and Composer packages. If a set of snippets has grown into a feature, Temper's blank plugin starter is one place to move it. See New themes and plugins.

When something goes wrong#

Code Snippets has a Safe Mode that stops snippets running, so you can get back into a site after a bad one. Its plugin page is plain that Safe Mode doesn't make every snippet safe.

Temper aims to stop a broken change from reaching visitors at all. Every file is checked before it's saved, for PHP syntax, JSON, theme.json, block.json and block markup. You see the change on the real site, only for you, before you publish. Publishing checks again, loads the home page before and after, and puts the previous version back at once if the publish broke it. See Save checks, Preview and Publishing.

Pricing#

Code Snippets Pro is sold yearly, monthly or as a lifetime licence, by number of sites. Check Code Snippets' pricing page for current prices.

Temper is free on any number of sites. Pro is a yearly licence for live sites, with local and staging sites free, and adds MCP, GitHub and GitLab, full history, tabs, builds and Composer (see Pro).

Which to choose#

Choose Code Snippets for small, independent changes: a filter, a shortcode, a tweak you want to switch off later, or code that must keep working whatever the theme.

Choose Temper if you build or maintain themes and plugins and want to change them in wp-admin with a preview first and a way back after. The two work side by side: snippets for one-off site tweaks, Temper for the theme and your custom plugins.