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
| Ability | elementor/add-button |
| Toolset | Elementor — toolset/elementor |
| Group | Elementor › Elements & Widgets |
| Requires | Elementor, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Not idempotent — each call changes the row set, so re-running is not a no-op |
| Ships in | AcrossAI 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
| Name | Type | Required | What it is |
|---|---|---|---|
post_id | integer | Yes | The post holding the Elementor document. |
text | string | Yes | The button label. |
link | object | No | The link: url, is_external and nofollow. |
size | string | No | xs to xl. |
align | string | No | Alignment within its parent. |
parent_id | string | null | No | The element to insert into. Null or omitted inserts at the document root. |
position | integer | No | Index among the parent’s children. Omitted appends at the end. |
What comes back
| Name | Type | What it is |
|---|---|---|
post_id | integer | The post written. |
element_id | string | The ID of the element created or affected. |
element | object | The element as stored. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present 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 Elementor Style Guide — the kit’s button styling
- Merge Elementor Element Settings — change it afterwards
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category