wpnav_gutenberg_insert_block
Insert Gutenberg blocks into WordPress posts at specific positions using path arrays for precise content placement.
Instructions
Insert a new Gutenberg block at specified path. Path is array of indices (e.g., [0] for first position, [1,0] for first child of second block).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post_id | Yes | Post ID to modify | |
| path | Yes | Path array (e.g., [0] = first block, [1, 0] = first child of second block) | |
| block_type | Yes | Block type (e.g., "core/heading", "core/paragraph", "core/button") | |
| attrs | Yes | Block attributes (e.g., {level: 2, content: "Hello"} for heading, {content: "Text"} for paragraph) |