Create Widget (block)
wp_create_widgetAdd a block-based widget to a sidebar or widget area, such as a Kadence footer column, by providing the sidebar ID and block markup.
Instructions
Create a block-based widget in a sidebar/widget area. Use for populating Kadence footer columns. Requires admin.
Args:
sidebar (string): target widget-area ID (from wp_get_sidebars).
content (string): block markup for the widget body.
Returns: the created widget (incl. its new id).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sidebar": "<sidebar>",
"content": "<content>"
},
"name": "wp_create_widget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Block markup for the widget body (e.g. '<!-- wp:heading -->...'). Creates a block-based widget. | |
| sidebar | Yes | Sidebar/widget-area ID to add the widget to (e.g. a Kadence footer area). Get IDs from wp_get_sidebars. | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |