Update Template 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 Template

Write

Update an existing template's title, layout data, type, or display conditions.

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

Updates any of title, type, conditions, or pagelayer_data on an existing pagelayer-template post identified by template_id. When pagelayer_data is supplied it goes through the same inline-CSS gate, header nav-menu gate, and, unless skip_validation is set, content-quality gate as create-template, and conditions are re-forced to include the site-wide rule for header/footer types.

See it in action

You ask your AI assistant

"Update template 45's layout to add a new call-to-action button."

Inputs

Name Type Required Description
template_id integer Yes Template post ID.
title string No New title.
type string No New template type.
pagelayer_data object No New layout node tree.
conditions array No New display conditions.
single_page_site boolean No Opts a header out of the Primary Menu widget requirement.

Returns

An object with success:true, or a WP_Error if the template isn't found or a gate rejects the new layout.

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.