wp_blocks_insert
Insert Gutenberg blocks into WordPress posts or pages at a specific position, using hash references to avoid overwriting changed blocks, and preview with dry-run.
Instructions
Insert Gutenberg block(s). Hash references prevent overwriting a block changed since it was read. Supports dry-run.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | Yes | ||
| ref | Yes | Post or page ID/slug | |
| block | Yes | ||
| dry_run | No | Preview changes without writing | |
| position | Yes | ||
| post_type | No | page | |
| allow_normalization | No | Allow saving when parse/serialize normalizes the original content | |
| if_unmodified_since | No | Fail if modified_gmt changed since this timestamp |