Get the plugin
WP MCP/Integrations/Themes

Themes integration

Kadence Pro Elements AI agent tool reference

Kadence Pro keeps an Element as its own post type, the element kind, its hook and priority, and its show, hide, user and device conditions all in post meta, in the shape the element editor saves and the theme reads. WP MCP Pro adds six ops to the theme pair while Kadence is the active theme family: list-kadence-layouts, get-kadence-layout and the hook catalog on theme-read; create, update and set-display-rules on theme-write. Every refusal (an unknown hook, a rule naming a post type, taxonomy or role the site lacks) is decided before any snapshot; create records the new element so rollback trashes it, and update and set-display-rules snapshot the element post with all its meta so rollback-operation restores it exactly. An HTML code element prints raw markup and scripts, so it is read without its content and never written, keeping code out of scope. Writes are off until a site opts in with the theme write switch, and every op takes edit_theme_options.

theme-readtheme-write

In practice

How Kadence Pro Elements work goes with an agent.

A Kadence Pro Element is a post of the kadence_element type. Its kind (Content Section, Fixed Section, Template or HTML Element) lives in post meta, and so does its placement: a hook name and a priority. Where it shows is four JSON strings of meta, for show, hide, user roles and devices, plus a flag for whether every show rule must match. The usual question is why a banner appears on a given page, and the answer is spread over those fields. WP MCP reads them together, adds Kadence's own hook list per element kind, and writes them back in the shape the element editor saves.

Why does the cookie notice show on the checkout page?

Runs list-kadence-layouts, which can filter by type or status, then get-kadence-layout, which returns its hook, priority, show and hide rules, user roles and devices. Both are reads.

Which hooks can a Fixed Section be placed on?

Runs list-kadence-hooks with type fixed. It returns the layout types and their writable flag, the hook groups Kadence's own Elements controller offers for that type, and the display rule vocabulary.

Create a draft Content Section with a promo message above the header.

Runs create-kadence-layout with type default, a title, content, and a hook and priority taken from list-kadence-hooks. It defaults to draft and is recorded as a creation, so rollback-operation trashes it.

Show the announcement element on desktop and tablet only, and only to subscribers.

Runs set-kadence-layout-display-rules with device and user keys. Each key passed replaces that key and the others are kept. A role the site lacks is refused before any snapshot.

What your AI can do

Real Kadence Pro Elements operations, every write reversible.

  • List Kadence Pro Elements and read one
  • Read the hook catalog an element can be placed on
  • Create an element and set its kind, hook and priority
  • Set an element's show, hide, user and device conditions
  • Roll back a created or updated element exactly

Example prompts

Example Kadence Pro Elements prompts.

List our Kadence elements and where each one is hooked.

Create an element that adds a promo bar above the header on the blog only.

Hide the announcement element for logged-in members.

Under the hood

The Kadence Pro Elements calls, under the hood.

wpmcp, kadence-pro

theme-read({ operation: "list-kadence-layouts" }), elements with kind, hook and conditions

theme-write({ operation: "set-kadence-layout-display-rules", args: {…} }), Pro; opt-in; snapshotted, reversible

Safety and access

What can be undone on Kadence Pro Elements, and what costs what.

Recoverable on Kadence Pro Elements

  • update-kadence-layout and set-kadence-layout-display-rules snapshot the element post with all its meta, and rollback-operation restores it exactly.
  • create-kadence-layout is recorded as a creation, and its rollback moves the new element to the trash.
  • Every refusal is decided before a snapshot, so a refused call leaves nothing to undo.

Kadence Pro Elements limits and opt-ins

  • Writes are off until a site enables the wpmcp_enable_theme_write filter, the same switch as the rest of the theme pair. The reads need no switch.
  • An HTML Element (kind script) prints raw markup and scripts, so it is read without its content and never written.
  • A custom hook may be any action name with custom_hook:true, except hooks that run before the page exists, such as init, wp and template_redirect.
  • The ops need edit_theme_options, Kadence as the active theme family, and Kadence Pro's Elements module switched on, or they answer module_disabled.

Free or Pro: The six Kadence Pro Element ops are Pro, on the theme-read and theme-write pair, and register only while Kadence is the active theme family. The free plugin's Kadence theme settings integration, for palette, fonts and widths, is separate. Reads work on any licensed site; the three writes (create, update and set display rules) stay off until wpmcp_enable_theme_write is enabled, and each needs edit_theme_options.

Part of WP MCP Pro

The Kadence Pro Elements integration is part of WP MCP Pro.

One Pro licence unlocks the Kadence Pro Elements tools and every other Pro integration on this site: Elementor deep editing, the other page builders, the forms adapter pack and more, 133 Pro tools in all. The free plugin still covers the rest of WordPress and the full snapshot and undo engine, so you can try the safety model before you buy.

Frequently asked

Kadence Pro Elements MCP: questions, answered.

Can the Kadence Pro Elements integration edit an HTML code element?

No. A Kadence HTML code element prints raw markup and scripts, so it is read without its content and never written; code is out of scope on purpose.

Is the Kadence Pro Elements integration the same as the Kadence theme settings integration?

No. That free integration edits the Kadence theme's palette, fonts and widths. This Pro integration builds Kadence Pro's Elements and sets their hooks and display rules.

What do Kadence display rules look like?

A rules object with show and hide lists, an all_show flag (true means every show rule must match, false means any one), user roles and devices. Each show or hide entry names a rule such as the whole site, singular or archive pages, with an optional sub-selection by ids or taxonomy. list-kadence-hooks returns the full vocabulary the site's Kadence supports.

Does the Kadence Pro Elements integration overwrite the rules I leave out of a call?

No. In set-kadence-layout-display-rules each key you pass (show, hide, all_show, user, device) replaces that key, and keys you leave out are kept. A rule that names a post type, taxonomy or role the site does not have is refused before any snapshot, so one bad value never half-applies.

Which element kinds can it create?

Content Section (default), Fixed Section (fixed) and Template (template) are writable. The HTML Element (script) kind is read only, because it holds raw markup and scripts. create-kadence-layout refuses a read-only kind with layout_type_read_only and lists the writable kinds in the refusal.

What happens if the Elements module is off?

Kadence Pro can be active with its Elements module switched off. The ops then answer module_disabled with where to turn it on, under Appearance, Kadence, Pro Add-ons. If Kadence Pro itself is missing or inactive, they answer plugin_missing or plugin_inactive with a link to the plugins screen.

Point your AI at Kadence Pro Elements.