The snippet editor has two parts: the tabs with your code and settings, and the sidebar with the snippet’s title, state, shortcode and organisation fields.
The tabs#
| Tab | What it holds |
|---|---|
| HTML | The markup — plus Live Preview and helper buttons (QuickCode, Icons and Loop Logic in Pro). |
| CSS | Styles — inline or as a file, minified (combined in Pro). |
| JS | JavaScript — jQuery, inline or file, minify/obfuscate, defer/async. |
| PHP | Server code and where it runs. |
| Attributes | Fields that turn the snippet into a block with settings. |
| Conditions | Whether the snippet is shown automatically, and where on the page — in Pro also on which pages, when and for whom. |
| Scripts & Styles | External CSS/JS files to load — and in Pro theme/plugin files to remove. |
Tab labels show what each tab holds: a dot for code, a count for attributes and files, the number of conditions in force.
Customize tabs — hide the empty tabs you never use. The choice is per user, applies at once and needs no save. A tab that holds code, attributes or files is always shown.
Saving#
There is one Save button, in the bar at the bottom of the window. The bar shows Unsaved changes while something is not saved, and the browser asks “Leave site?” if you try to leave with unsaved changes. Ctrl + S (Cmd + S on a Mac) saves from inside any code editor.
When someone else is editing PRO#
If you open a snippet another user already has open, the editor says “Name is currently editing this code” and shows it read-only, so your changes can’t overwrite theirs:
- Back to Codes — return to the list.
- Take over — take the snippet over; the other user is told that you have taken over.
The lock refreshes in the background while the other editor is open, and expires about two and a half minutes after it closes.
Revisions PRO#
With Revision History on (Tools → Developer), each save keeps a snapshot of the previous version — title and all code, who saved it and when. The Revisions panel lists them with three buttons:
- View — show that version’s code.
- Diff — compare it with the current code, tab by tab.
- Restore — bring it back. The current state is snapshotted first, so a restore can be undone.
Search & Replace always takes a snapshot before it changes a snippet, even with Revision History off. See Developer Tools.
Sidebar fields#
Title#
How the snippet is named in All Codes, in the block editor and in error reports (and in Pro’s Debug Bar). The browser tab shows the title and ID too.
Active#
On while the snippet runs on the site. Switch it off to stop the snippet without deleting it. New snippets are active.
Test mode#
The snippet runs only for logged-in administrators. Use it to check a snippet on the live site before visitors see it. Test mode also holds back a PHP tab that runs in the admin, on the front end or everywhere.
Shortcode#
A read-only box with the snippet’s shortcode:
[wp_code id="12"]
Copy copies it; Copy with attributes adds every attribute with its default value — Select gets its first option and Range its starting value; Repeater attributes are left out and Post, Term, SVG and Icon attributes are empty:
[wp_code id="12" heading="Our team" show_button="1"]
The older form [WP-Coder id="12"] still works, and [wp_code title="Hero"] finds the snippet by title.
A shortcode can also wrap content: [wp_code id="12"]Thank you![/wp_code] — the snippet reads it as {{$shortcode_content}} in HTML or $shortcode_content in PHP.
Change ID PRO#
Opens a dialog to give the snippet another ID. Shortcodes and blocks refer to the ID, so update every [wp_code id="old"] after changing it.
Tags#
Several tags separated by commas (landing, hero), with autocomplete from existing tags. Spaces around the commas don’t matter; a tag can’t contain a comma. Tags filter All Codes, export a group of snippets and limit Search & Replace.
Link#
A reference URL — the live page, a design, a task. An Open link icon opens it in a new tab. It doesn’t affect where or how the snippet renders.
Note#
A private note under the Link (Add a note). It is shown under the title in All Codes and never printed on the site.
Page template PRO#
Makes the snippet replace the theme template on the chosen pages: they show only this snippet, between the site’s head and footer scripts.
- None — off (default).
- Pages — All pages, Selected pages (by ID), Page type (Home, Posts page, Search, 404, Archive, and every page template).
- Posts — All posts, Selected posts (by ID), Posts in category (by ID).
- Archives — Category, Tag, Author, Date, All Categories, All Tags, All Authors, Default Archive.
- Custom Post: … — All, Selected, taxonomy and Archive for each public custom post type.
Is / is not inverts a rule, and Enter IDs takes a comma-separated list (12, 34).
Template vs Conditions. Template makes the snippet the whole page. Conditions → Display Rules inserts it into an existing page. Use Template for landing pages and standalone layouts. More in Page Templates.