30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Delete Elementor Template

elementor/delete-template moves a template to the trash, or permanently deletes it when force is set.

Trashing is the default, and it is almost always the right choice.

Before you run it

Deleting a live Theme Builder template removes it from every page its conditions matched, immediately — the theme’s own header or footer takes over, which on a site designed entirely in Elementor can look like the site breaking. Trashing is the default and is reversible; force is not, and a permanently deleted template’s design is gone.

At a glance

Abilityelementor/delete-template
ToolsetElementor — toolset/elementor
GroupElementor › Templates & Theme Builder
RequiresElementor, active on the site
Capabilitymanage_options
SafetyDestructive — trashes by default, deletes permanently with force.
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

A trashed template stops rendering. For a section template saved for reuse that is invisible; for a live header it is immediate and site-wide, and the theme’s own header takes over.

On a site whose design lives entirely in Elementor, that looks like the site breaking rather than like a template being removed.

Trashing is reversible with elementor/restore-template, which is the reason to prefer it. A trashed template also keeps its display conditions, so restoring puts it back where it was.

That same property is why trashed templates can interfere with new ones: Elementor’s condition conflict checking still sees them.

Permanent deletion removes the design. Export it first if there is any chance of wanting it back.

Not idempotent.

Input

NameTypeRequiredWhat it is
template_idintegerYesThe template post ID.
forcebooleanNoPermanently delete instead of trashing.

What comes back

NameTypeWhat it is
template_idintegerThe template.
deletedstringWhether it was trashed or deleted permanently.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Delete the old header template.

It resolves to one call:

{
  "ability": "elementor/delete-template",
  "parameters": {
    "template_id": 640
  }
}

Worth knowing

  • Removing a live Theme Builder template changes the whole site at once.
  • Trashed templates keep their conditions and still affect conflict checks.
  • Export before a permanent delete.
  • Restorable while trashed.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading