Update Element is a WordPress ability from Page Builder: Pagelayer – Drag and Drop website builder — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Update Element

Write

Change the attrs and/or content of one existing page node by its ID — the cheapest way to edit part of a page.

Requires the Pagelayer plugin on WordPress 6.9+ (or another source of wp_register_ability()) for the Abilities API — registration is skipped entirely via a function_exists() guard when it isn't available, and ability categories similarly require wp_register_ability_category(). Most abilities require the 'edit_posts' capability; update-global-styles, create-menu, and delete-menu require 'manage_options'. search-images additionally needs a Pexels API key configured on the Pagelayer AI Agents settings page, and get-library-sections/import-library-section call Pagelayer's own hosted library API. Four near-duplicate abilities (get-widget, get-widgets-summary, edit-layout, navigator) are registered in source with mcp_public:false — fully callable over the REST Abilities API but intentionally left out of the advertised MCP tool list as duplicates of get-widget-schema, list-widgets, update-page, and get-page respectively — and are excluded from this listing.

What it does

Locates a node by pagelayer-id or "@0.1.2" position path and merges the given attrs into its existing attrs, not a full replace, and/or replaces its content, after scrubbing any inline CSS from what was sent, rejecting the write outright if found, and, unless skip_validation is set, running the content-quality gate against just the updated node. This is the ability update-page's own description recommends over resending the whole pagelayer_data tree for a small change.

See it in action

You ask your AI assistant

"Change the heading text on element a8fn2 of page 128 to "Welcome to Our Bakery"."

Inputs

Name Type Required Description
post_id integer Yes Page post ID.
element_id string Yes pagelayer-id or "@0.1.2" position path, as shown in the get-page outline.
attrs object No Attribute values to merge into the node.
content string No Replacement content for the node.
skip_validation boolean No Bypass the content-quality gate.

Returns

An object with success:true, or a WP_Error if the element isn't found, inline CSS was found in what was sent, or the updated node fails the quality gate.

Permission

Requires the 'edit_posts' capability.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.