EMCP Themer
New in v3.1.0. EMCP Themer is a builder-agnostic WordPress theme builder: design Header / Footer / Single / Archive / Search / 404 layouts with any page builder (Gutenberg, Elementor, …), assign display conditions, and the plugin injects them on the front end. It’s free and on by default, with 9 MCP tools so an AI agent can create and target templates end to end.
Loops (Loop Item / Loop Grid) are intentionally out of scope.
How it works
Section titled “How it works”- One CPT, any builder. Templates are a single custom post type (
emcp_theme_template), editable by whatever builder you use: Gutenberg, Elementor, or another. Each template is typed (header/footer/single/archive/search/404) and carries its display conditions. - Its own dashboard menu. Themer gets a top-level EMCP Themer menu in wp-admin (not a tab inside EMCP Tools). The menu only exists while the module is active. Disabling the module is a true kill switch for the CPT, front-end rendering, tools, and menu.
- Slot-based resolution. Every request fills up to three slots: header / body / footer. The body slot’s type is derived from the main query (singular → single, archive → archive, plus search and 404). A pure resolver picks one winner per slot by matched-condition specificity → priority → newest.
- Conditions are Include / Exclude rules evaluated against a rebuilt-on-save, autoloaded condition index, so there are zero extra front-end database queries.
- Hybrid render engine. A body template (single/archive/page/search/404) keeps your theme’s header and footer and swaps only the content area, exactly like Elementor Pro’s Single templates. If you also build both a Themer header and footer, Themer renders a complete standalone document instead (no theme chrome). A single standalone header or footer is injected at the active theme’s hook via per-theme adapters, Astra, GeneratePress, Kadence, OceanWP, Blocksy, Neve, Hello, with a template-tag (
emcp_themer_location('header'|'footer')) and an optional force-render fallback for unsupported themes.
Honest limitation: dynamic single/archive templates are most powerful with Elementor’s dynamic tags; Gutenberg shines for header/footer/404/search.
The condition builder
Section titled “The condition builder”The template edit screen has an Elementor-style step-wise condition builder: Relation → Group → Sub-type → Object, plus an “Add condition” repeater. It’s type-aware: a Single template offers Singular targets, an Archive template offers Archives, Header/Footer can target anything, and Search/404 need no conditions.
Free vs Pro
Section titled “Free vs Pro”| Free | Pro | |
|---|---|---|
| Render engine + all template types | ✓ | ✓ |
| Templates per type | 1 | Unlimited |
| Scope selectors | Entire site · all singular · front page · one post type · all archives · one post-type archive · one taxonomy archive | + per-post, per-term, author, author-archive, date |
| Rules | Include | Include and Exclude |
| Priority ordering | ✗ | ✓ |
| All 9 MCP tools | ✓ | ✓ |
The whole engine and all 9 tools are free; Pro adds unlimited templates per type, granular targeting, Exclude rules, priority, and the dynamic sources that need configuring.
Widgets and blocks
Section titled “Widgets and blocks”Classic themes don’t ship the dynamic parts you need to build a template, so Themer adds its own: 19 Elementor widgets and 14 Gutenberg blocks, under an EMCP Themer category in each builder. They resolve against the current request, so a Single template’s Post Title shows the viewed post and an Archive template’s Archive Posts shows that archive’s posts.
Nine of these arrived in v3.13.0, which is what makes a Single, Archive, Search or 404 template finishable without Elementor Pro.
| Element | What it outputs | Elementor | Gutenberg |
|---|---|---|---|
| Post/Page Title | The queried post’s title (tag + optional link) | ✓ | ✓ |
| Post Content | The queried post’s full content | ✓ | ✓ |
| Post Excerpt | The excerpt, optionally trimmed to a word count | ✓ | ✓ |
| Featured Image | The featured image at any registered size, optionally linked | ✓ | ✓ |
| Post Meta | Date, author, categories, tags, comments (pick which) | ✓ | ✓ |
| Post Info | An ordered metadata row: author, date, time, comment count, terms, or a custom field, in the order you list them | ✓ | |
| Author Box | Avatar, name, biography and links, each part switchable | ✓ | ✓ |
| Post Navigation | Previous / next links, optionally staying within the same term | ✓ | |
| Post Comments | The comment list and form | ✓ | |
| Archive Title | The archive’s title (category / tag / author / date / post type) | ✓ | ✓ |
| Archive Posts | The archive loop: grid or list, columns, image, excerpt, read-more, pagination | ✓ | |
| Archive Posts (classic) | The original loop element, kept as-is so existing templates render unchanged | ✓ | ✓ |
| Search Form | A search form, which is what makes a 404 template worth having | ✓ | |
| Sitemap | Lists whichever post types and taxonomies you choose | ✓ | ✓ |
| Breadcrumbs | A trail: uses Yoast / Rank Math / SEOPress if present, else built-in | ✓ | ✓ |
| Menu | Any WordPress nav menu | ✓ | ✓ |
| Site Logo | The custom logo (linked), with a text fallback | ✓ | ✓ |
| Site Title | The site name (linked) + optional tagline | ✓ | ✓ |
| Description | Post excerpt on singular, archive description on archives | ✓ | ✓ |
Comments, search and post navigation are not duplicated as blocks, because WordPress core already ships a block for each.
Post Meta and Archive Loop are untouched. Post Info and Archive Posts are new elements beside them, not replacements, so templates you have already built keep rendering exactly as they do now.
Gutenberg blocks use native block supports (color, typography, spacing, border) so the editor’s own controls style them, with a live server-side preview. Elementor widgets add a Style tab. Because they’re regular blocks, the Gutenberg block tools (add-block, insert-pattern) can drop them into templates over MCP.
While you’re editing a theme template the EMCP Themer category is promoted to the top of the Elementor panel, directly under Favorites. On an ordinary page it stays where it was, and the widgets remain available there: a sitemap, search form or posts grid is useful outside a template too.

Dynamic data
Section titled “Dynamic data”New in v3.13.0. Instead of hunting for a special widget, you pick the source from the field itself. In Elementor it appears in the dynamic picker on any field that accepts one; in the block editor it binds to a Heading, Paragraph, Image or Button. A heading can show the post title, an image the featured image, a button can link to the post.
This works on free Elementor. Elementor ships the machinery for dynamic fields but none of the sources, so on a free install that picker is empty. EMCP fills it.

| Source | Type | Tier |
|---|---|---|
| Post/Page Title | text | Free |
| Post Excerpt | text | Free |
| Post URL | url | Free |
| Post Date | date | Free |
| Post ID | text | Free |
| Featured Image | image | Free |
| Archive Title | text | Free |
| Site Title | text | Free |
| Site Logo | image | Free |
| Description (site tagline / archive description) | text | Free |
| Custom Field (ACF-aware) | text | Pro |
| Author Name | text | Pro |
| Author Bio | text | Pro |
| Author URL | url | Pro |
| Author Avatar | image | Pro |
| Term Name | text | Pro |
| Term URL | url | Pro |
Pro also adds a fallback value for when a field is empty, plus date and text formatting.
Sources are typed. On Gutenberg, the type is enforced when the binding is made: an image source cannot be bound to a Heading block, and a mismatched binding is refused at call time (dynamic_type_mismatch) rather than rendering blank later. On Elementor, type-matching only filters what appears in the dynamic-tag picker’s UI, it is not re-checked when a binding is set programmatically through the MCP tools, so pass sources deliberately: list-dynamic-sources’ type field is your source of truth for what a given control can actually use.
While you edit a template there is no queried post, so dynamic fields resolve against a sample post for preview purposes. The sample is chosen at render time and is never written into the template.
MCP tools
Section titled “MCP tools”All 9 register when the Themer module is active. Build a template’s content with the Gutenberg or Elementor tools against the returned template_id.
emcp-tools/create-theme-template
Section titled “emcp-tools/create-theme-template”Create a theme template of a given type.
Input: type (header/footer/single/archive/search/404), title, optional conditions.
Returns: { template_id, edit_url, type }.
emcp-tools/list-theme-templates
Section titled “emcp-tools/list-theme-templates”List theme templates, optionally filtered by type.
Returns: array of { template_id, title, type, conditions }. Read-only.
emcp-tools/get-theme-template
Section titled “emcp-tools/get-theme-template”Full detail for one template: type, conditions, detected builder, built content status.
Input: template_id. Read-only.
emcp-tools/update-theme-template
Section titled “emcp-tools/update-theme-template”Update a template’s title, type, or conditions.
Input: template_id plus any of the fields.
emcp-tools/set-template-conditions
Section titled “emcp-tools/set-template-conditions”Set a template’s display conditions (Include/Exclude selectors, priority). Granular selectors, Exclude rules, and priority require Pro. They’re rejected on free with a clear message.
Input: template_id, conditions.
emcp-tools/delete-theme-template
Section titled “emcp-tools/delete-theme-template”Delete a theme template.
Input: template_id. Destructive.
emcp-tools/resolve-template
Section titled “emcp-tools/resolve-template”Verify which templates fill each slot (header/body/footer) for a given post or request context: the resolver’s decision, exposed for debugging your conditions.
Input: post_id or a context descriptor. Read-only.
emcp-tools/list-condition-targets
Section titled “emcp-tools/list-condition-targets”Discovery: list the selectors and objects (post types, taxonomies, …) you can target, so an agent can build valid conditions.
Returns: the available condition targets. Read-only.
emcp-tools/list-dynamic-sources
Section titled “emcp-tools/list-dynamic-sources”New in v3.13.0. Discovery: what dynamic sources this site offers, what each one produces, and where it can be used, so an agent can bind fields without guessing.
Input: optional bindable_only.
Returns: { sources: [{ key, label, type, args, bindable, surfaces }], count }. surfaces reports only what actually exists for that source (widget, block, elementor-tag, block-binding), so an agent is never sent looking for a block that was never registered. Read-only.
Two existing tool families accept a binding alongside the usual settings, each with its own param shape:
- Catalog widgets (
add-free-widget/add-pro-widget, see Widgets):dynamic: { <field_name>: { source, args? } }—sourceis alist-dynamic-sourceskey.update-widgetdoes not yet acceptdynamic. - Gutenberg blocks (
add-block/update-block, see Gutenberg blocks):bindings: { <attribute_name>: { source, args? } }.
Atomic widgets (add-atomic-widget and the rest of the Atomic elements family) don’t accept a binding param at all yet, there’s no dynamic-data path for Elementor 4.0’s atomic controls today, only the legacy catalog widgets above.
PHP Templates (advanced)
Section titled “PHP Templates (advanced)”For layouts that neither Gutenberg nor Elementor free can express (a bespoke query loop, custom markup, or integration with another plugin’s template tags), Themer can hand a region’s render off to a custom PHP template. A connected AI agent authors the PHP into a validated sandbox; you then select it on a template, and it takes over that region’s render. The Themer template still owns where it applies (its type + display conditions); the PHP owns what markup is produced.
The feature is free but off by default. Turn it on under EMCP Tools → Tools → “Themer PHP Templates (advanced)”. Enabling it reveals a PHP Templates screen under the EMCP Themer menu (review the code + validation report of anything an agent authored) and a “Render with PHP template” selector on each template’s edit screen.
How it’s kept safe
Section titled “How it’s kept safe”- You are the execution gate. An AI can only create drafts. There is no “attach” tool. A draft has no executable file on disk and never runs. It only compiles and executes once you select it on a template in the metabox. Detaching it removes the compiled file again.
- Strict validation. Every template is scanned before it can be stored or compiled. Code execution (
eval/exec/backticks), file loading (include/require), network calls, and file writes are rejected outright, the same guardrail as the PHP Snippets sandbox. Emit markup withecho/heredoc; a closing?>tag is not allowed. - Tamper-proof + self-healing. Compiled templates are hash-verified on every render and run inside output buffering with fatal recovery, so a broken template falls back to your builder content instead of white-screening the page.
- Capability-gated. Authoring requires
manage_options+unfiltered_html.
Render behaviour
Section titled “Render behaviour”A PHP template is region-only. It outputs just its region’s markup and slots into the same engine as builder content. A single/archive template renders inside your theme’s header/footer; a header/footer template replaces the theme’s chrome via the theme adapter. If the PHP produces nothing (or errors), Themer transparently falls back to the template’s builder content.
MCP tools
Section titled “MCP tools”All five require the feature to be enabled and ship disabled-by-default (opt in per-tool on the Tools tab). There is intentionally no attach tool. Selection stays in your hands.
| Tool | Purpose |
|---|---|
emcp-tools/create-theme-php-template | Author a validated draft PHP template (type: header/footer/single/archive/any). Never runs until you attach it. |
emcp-tools/list-theme-php-templates | List drafts (id, title, type, compiled state, last error). Read-only. |
emcp-tools/get-theme-php-template | Return one template’s code + validation report. Read-only. |
emcp-tools/update-theme-php-template | Update a template’s code/title/type; re-validates (and recompiles if attached). |
emcp-tools/delete-theme-php-template | Delete a template and its sandbox file. Destructive. |