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

Start free trial

Add Elementor Button

elementor/add-button inserts an Elementor button widget with text, a link, a size and an alignment.

The link is an object rather than a string, which is where the interesting settings live.

At a glance

Abilityelementor/add-button
ToolsetElementor — toolset/elementor
GroupElementor › Elements & Widgets
RequiresElementor, active on the site
Capabilitymanage_options
SafetyWrites data
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

The link carries three things: the URL, whether it opens externally, and whether it is marked nofollow. Those are stored together because Elementor’s link control is one control, and splitting them would mean a caller could set two of the three and silently lose the rest.

The external flag adds target="_blank". Worth using deliberately rather than by habit — a link that leaves the site unexpectedly is a small annoyance repeated on every click.

The size is one of Elementor’s named sizes rather than a measurement, which is what keeps buttons consistent across a site. A button styled by hand to a specific pixel size is a button that will not follow the kit when the kit changes.

Button styling beyond size comes from the kit’s button settings, which elementor/get-style-guide reports.

Not idempotent.

Input

NameTypeRequiredWhat it is
post_idintegerYesThe post holding the Elementor document.
textstringYesThe button label.
linkobjectNoThe link: url, is_external and nofollow.
sizestringNoxs to xl.
alignstringNoAlignment within its parent.
parent_idstring | nullNoThe element to insert into. Null or omitted inserts at the document root.
positionintegerNoIndex among the parent’s children. Omitted appends at the end.

What comes back

NameTypeWhat it is
post_idintegerThe post written.
element_idstringThe ID of the element created or affected.
elementobjectThe element as stored.
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:

Add a “Get started” button linking to the signup page.

It resolves to one call:

{
  "ability": "elementor/add-button",
  "parameters": {
    "post_id": 412,
    "text": "Get started",
    "link": { "url": "/signup/" },
    "size": "lg",
    "parent_id": "a1b2c3d"
  }
}

Worth knowing

  • The link is one object — set it whole rather than in parts.
  • Named sizes follow the kit; hand-set measurements do not.
  • Use the external flag deliberately, not by habit.
  • Not idempotent.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading