Module StudioOverview

Module Studio

Add code modules to your site with UiChemy's Module Studio: markup, styles, scripts, and PHP, each with its own placement, display conditions, and built-in safety checks.

Module Studio is UiChemy's code manager. A module is a small folder of files, markup, styles, scripts, or PHP, that you can switch on, place anywhere on your site, and limit with conditions. Each module has:

  • One on/off switch.
  • One placement: where it runs.
  • One set of display conditions: who sees it, and where.

The page sums it up as "Feature-based code modules: markup, styles, behaviour and logic, safely scoped."

Module Studio is in Beta, and the dashboard tab shows a Beta badge. It was previously called Snippet Engine, and it replaces the old Code Snippets menu item. Most of it is free, with extras in UiChemy Pro. See Free vs Pro.

Why It Matters

  • No extra snippets plugin: add banners, styles, tracking code, and PHP tweaks right inside UiChemy.
  • Runs only where you need it: placements and display conditions keep each module to the right pages and visitors.
  • Safe by design: code is checked on save, a module that crashes the site is switched off automatically, and Safe mode pauses everything in one click.

Use Cases

  • A site-wide notice: a Markup module in Global Footer (All Pages), shown only to logged-out visitors.
  • Style fixes: a Styles module with CSS for colours, spacing, or layout.
  • Tracking or widgets: a Behaviour module with JavaScript in the footer, loaded on first interaction.
  • Server-side tweaks (Pro): a Logic module with a PHP hook or filter.

Where to Find It

Go to UiChemy → Module Studio (Beta), under Manage in the sidebar.

Until you create one, the page shows Create your first module with two buttons:

Below it, Or start with a file type offers four cards: Behaviour, Logic, Styles, and Markup. Each one opens the create dialog with its file type already picked.

Module Types

StarterFileUse it forPlan
MarkupTwig or HTMLBanners, notices, and embedsFree
StylesCSSColours, spacing, and layout fixesFree
BehaviourJavaScriptTracking, widgets, and interactivityFree
LogicPHPHooks and filters that run on the serverPro
  • You pick the file type when you create a module: js, php, css, html, or twig. The starter cards pick js (Behaviour), php (Logic), css (Styles), or twig (Markup) for you.
  • Twig values let markup show live details, such as the site name, the logged-in user's name, or the current post's title. Output is escaped by default.
  • HTML files are filtered for safety, so <script> and similar tags are removed. Put scripts in a JavaScript file instead.

One File Snippet or Multi File Module

When you create a module, you pick one of two kinds. The kind sets up the first file and the settings you see, and can't be changed later.

KindWhat it isBest for
One File Snippet (default)Easy to use. Add one file and pick where it shows and who sees it.A single style fix, script, banner, or PHP hook
Multi File ModuleA folder of files that works like a small plugin and gives more flexibility. You code where everything loads yourself.Features that need several files working together

Creating a Module

Start a new module

Click New module, or one of the Or start with a file type cards. The What do you want to create? dialog opens.

Name it

Enter a Name, for example "Cookie banner". A name is required.

Pick a kind

Choose One File Snippet or Multi File Module. See One File Snippet or Multi File Module. You can't change the kind later.

Pick a file type

Under File type, pick js, php, css, html, or twig. A short hint below explains each one. Click Continue.

Write the code

Add your markup, styles, or script in the editor. A new module shows a Draft badge, which changes to Unsaved changes after edits, and starts Active.

Choose where it runs

Open the Placement picker and pick a location. Use Search placements to find one quickly.

Choose who sees it

Leave display conditions off to run it for everyone, or turn on Only when rules match to add rules.

Save

Click Create snippet, or Save changes when editing. If you try to leave with unsaved edits, you're asked to Discard changes, Keep editing, or Save and leave.

Placement: Where It Runs

GroupPlacementsPlan
For PHP snippetsRun on All Pages (Frontend + Admin) (default), Frontend Pages Only, Admin Dashboard OnlyFree
Entire siteGlobal Header (All Pages), Global Body (All Pages), Global Footer (All Pages)Free
Entire admin areaAdmin Header Area, Admin Footer AreaFree
Post contentBefore Post Content, After Post Content, After Post ElementFree
Target via CSS selectorInsert Before Element, Insert After Element, Insert at Start of Element, Insert at End of Element, Replace Target ElementPro
In content (by %)After 25%, After 33%, Midpoint (50%), After 66%, After 75% of ContentPro
WooCommerceBefore or after Product Listing, Single Product, Product Summary, Cart Content, Checkout Form, Checkout Button, and Before Thank You PagePro
Easy Digital DownloadsBefore or after Purchase Button, Single Download, Checkout Cart, and Purchase FormPro
  • CSS selector placements add a CSS selector field, for example .site-header or #main .title.
  • Run on background requests also runs the module on background (AJAX) requests. It's off by default.

The default placement, Run on All Pages (Frontend + Admin), only runs code. It doesn't show markup. For a banner or notice, choose a visible location such as Global Footer (All Pages) or After Post Content.

Shown To: Display Conditions

Only when rules match is off by default, so the module runs for everyone. Turn it on to build rules: Run when All / Any rules match, then If … / And if ….

Operators are is, is not, contains, does not contain, starts with, ends with, exists, does not exist, before, after, greater than, and less than.

Example: To show a "Free shipping this week" banner only to visitors who aren't logged in, create a Markup module, set its placement to Global Header (All Pages), turn on Only when rules match, and add User Login Status is logged out.

Details, Shortcode, and PHP Approval

The Module List

  • Tabs: All, Active, Off, and Needs attention (only shown when a module has an error or PHP waiting for approval).
  • Find modules: Search snippets, a Tags filter, and list or grid view.
  • Columns: Files, Updated, and the Active switch.
  • Badges: Error and PHP awaiting approval.
  • Row menu: Edit, Export JSON, Export as plugin (Pro), Delete.
  • Bulk actions: Turn on, Turn off, Delete.

Settings

Click the gear icon to open Module Studio settings. It has two tabs:

  • General: how Module Studio shows up in WordPress.
  • Safe mode: stops every module at once, so a module that breaks the site can be fixed.

Click Save changes to apply. The How it works link at the bottom opens a short guide.

TabOptionWhat it doesDefault
GeneralAdmin bar infoShows a UiChemy Modules menu in the WordPress toolbar. It lists the modules running on the page you're viewing, so you can jump straight to one to edit it.Off
Safe modeSafe modePauses every module site-wideOff
Safe modeEmergency recovery URLA secret link that turns Safe mode on, even when wp-admin won't load or you're signed out. Click Copy and bookmark it. Rotate secret creates a new link and makes the old one stop working.Created for you

Safety and Recovery

  • Crash protection: if a module causes a fatal error, it's switched off automatically and marked Error in the list.
  • Code checks on save: PHP is checked for syntax errors. CSS, JS, HTML, and Twig are checked for PHP tags and broken brackets. JSON must be valid, and SVG can't contain scripts. Problems show above the editor, with the file and line.
  • Safe mode: pauses every module site-wide. When it's on, a banner says "Safe mode is on. Every snippet is paused until you turn it off.", and the toolbar shows a warning.

If a module breaks the site:

Turn on Safe mode

Open your bookmarked Emergency recovery URL. It turns Safe mode on even if you can't log in.

Fix the module

Fix the module, or turn it off.

Turn Safe mode off

In Module Studio settings, turn Safe mode off and save.

Import and Export

  • Export JSON (Free) downloads the module as a .json file.
  • Export as plugin (Pro) downloads a standalone WordPress plugin .zip that runs the module without UiChemy.
  • Import: click Import .zip. In Import a module, drop one .zip file made with Export as plugin, or click Choose file. You see what's inside before anything is saved: a Review the import preview lists every file and runs the safety checks. Finish with Import snippet, or Replace snippet if it already exists.
    • Imported modules always arrive switched off.

AI and MCP

AI tools connected through MCP can list and read modules, check their status, and validate code and conditions on the free plan. Creating, editing, importing, exporting, and deleting modules with AI needs UiChemy Pro.

Free vs Pro

FeatureFreePro
Modules with one file: CSS, JS, HTML, or Twig✅✅
PHP modules✅
Multiple files and folders, plus other file types✅
Placements: site-wide header, body, and footer, admin header and footer, PHP on load, before and after post content✅✅
CSS selector placements✅
In-content % placements✅
WooCommerce / EDD placements✅
Conditions: User Login Status, User Role Type, Target Post Type, Specific Post or Page✅✅
All other conditions: device, browser, OS, cookies, country, URL, dates and times, eCommerce, and more✅
Shortcode per module✅
Export JSON, import, Safe mode, crash protection, code checks, admin bar info✅✅
Export as plugin✅
AI: read and validate✅✅
AI: create, edit, import, export, delete✅

On the free plan, Pro items show a Pro badge, and the editor notes: "Multiple files, PHP, scheduling and advanced conditions are Pro. Free supports one CSS, JS, HTML or Twig file." If Pro is removed later, a module built with Pro keeps its existing Pro features, but you can't add new ones.

Permissions

PermissionWho has it by defaultAllows
View snippetsEditors and aboveSee the list and read code
Manage snippetsEditors and aboveTurn modules on or off, delete them, change settings
Edit snippetsAdministratorsWrite CSS, JS, HTML, and Twig, and import
Edit PHP snippetsAdministratorsWrite PHP

PHP editing is turned off when the site blocks file editing, when file changes aren't allowed, or for non-super-admins on multisite. Opening the UiChemy dashboard itself needs an administrator.

Limits

LimitValue
Modules per site200
Files per module40
Size per file256 KB
Folder depth8 levels
Saves30 per minute
ZIP import200 files, 8 MB uncompressed

If your host doesn't allow file changes, modules can't be saved.

If It Doesn't Work

Frequently Asked Questions