⌘K

Template Editor

Edit any file of the active theme directly from the admin panel — PHP templates, CSS stylesheets, JavaScript, and JSON configuration files.

Access: Admin → Template Editor (sidebar, Appearance section).


Overview

The Template Editor replaces the CSS-only editor from previous versions. Instead of editing a single stylesheet, you can now browse and edit every file in the active theme from a single interface.

The editor uses CodeMirror 5 with syntax highlighting, bracket matching, and auto-close brackets. The theme applied to the editor is Dracula.


File selector

Files are grouped by folder in a dropdown at the top of the editor. The groups follow the theme directory structure:

GroupContains
(root)theme.json, functions.php, header.php, footer.php, home.php, 404.php, content-*.php
css/All CSS files
js/All JS files
partials/Card partial overrides
page-templates/Custom page templates

Selecting a different file navigates immediately. If you have unsaved changes, a confirmation dialog is shown before leaving.

The editor opens on css/style.css by default, or the first available file if style.css is not present.


Saving

Click Save or press Ctrl+S / Cmd+S.

Before writing to disk, the editor automatically creates a timestamped backup of the current file. The backup filename encodes the relative file path to avoid collisions between files with the same name in different folders (e.g. css__style.css-20260626-143022.bak).

An unsaved changes indicator appears in the toolbar when the file has been modified but not saved. The browser will also warn you if you try to navigate away with unsaved changes.


File stats

The right panel shows four stats for the file currently open:

File typeStats shown
CSSLines, rules ({ count), CSS variables (-- count)
PHPLines, functions, comments
JSLines, functions, comments
JSONLines, key count (: count)

Backups

Every save creates a backup. Backups for the currently open file are listed in the right panel, sorted newest first, with their timestamp and size.

Restore — overwrites the current file with the backup. Before restoring, a safety snapshot of the current file is created automatically.

Delete — permanently removes a backup file. Both actions require confirmation.

Backups are stored in /bckps/templates/{theme-name}/ and are not served publicly.


Keyboard shortcuts

ShortcutAction
Ctrl+S / Cmd+SSave
Ctrl+/ / Cmd+/Toggle line comment

Notes

  • Only files belonging to the active theme are editable. To edit a non-active theme, activate it first.
  • The editor does not create new files — use FTP or your local environment to add files to a theme, then edit them here.
  • Changes take effect immediately on the live site after saving. There is no preview step.
  • If mod_rewrite or OPcache is active, PHP file changes are reflected on the next request without any cache-clearing step.