Repository navigation
WordPress Editing and Publishing
Generated layout files become WordPress content through a manual paste or an authenticated editing workflow. The important distinction is between generating a file, saving a draft and publishing a page.
- Create or open the intended draft in WordPress.
- Switch the block editor to Code editor using its options menu.
- Paste the complete generated block markup at the intended location. Preserve unrelated content.
- Return to the visual editor. Confirm that the expected native blocks appear and no recovery prompt is shown.
- Inspect content, links, images and responsive behavior. Open interactive components.
- Save the draft, reload it and check again. Publish only when that is your intended action.
Do not paste the file into a Paragraph or Custom HTML block. Do not automatically accept recovery as a substitute for fixing invalid output; recovery may alter the structure you intended to preserve.
Your account's HTML capabilities and the site's filters can affect SVG and other markup. If content is stripped, investigate permissions and the actual stored content rather than escalating an account's privileges by default.
The skill does not provide a server or credentials. Use the site's documented connection and permissions. An assistant needs access to raw stored content, not just rendered HTML.
For a normal page, the relevant read is:
GET /wp-json/wp/v2/pages/ACTUAL_ID?context=edit
Read content.raw. Do not put content.rendered back into the page; it can lose the editor's block structure. Other post types can use different routes.
A safe edit follows this sequence:
- Resolve URL, canonical/slug, post type, actual ID and status.
- Snapshot current raw content and any separately authorized metadata.
- Generate the intended change and run preflight.
- Splice the changed section into the original content. Do not regenerate unrelated sections.
- Re-fetch immediately before writing; stop on unexpected concurrent edits.
- Update only the intended field/record and preserve publication status unless a transition was requested.
- Fetch raw content again and compare it with the submitted content.
- Check the native editor and the relevant frontend behavior.
Use the helper for transport verification:
python3 skills/generateblocks-layouts/scripts/verify_roundtrip.py \
--local output/submitted.html --remote output/readback.htmlBoth files must represent the same intended content or section. A successful comparison proves transport integrity, not visual correctness or a complete accessibility audit.
A random four-digit scope belongs only to generated block IDs. Never send a write request to a WordPress record merely because its number matches that scope. Draft creation is needed when the task requires a new WordPress record, not as a prerequisite for offline authoring.
Page edits do not implicitly authorize Global Style changes, theme code, metadata changes or replacing a published homepage. Make the requested destination and state explicit in your brief.
Read the record before retrying: the write may already have completed. If stored content changed unexpectedly, compare it with the snapshot and investigate the specific transformation. Restore only the intended affected content when rollback is needed, preserving later legitimate edits.
Detailed route guidance and transport failures: MCP/REST publishing reference.
Wiki home · Repository · Latest release · Report an issue
The wiki covers GenerateBlocks Skills; plugin features depend on the installed GenerateBlocks/Pro version. Detailed authoring rules are maintained in the repository's skill files.
GenerateBlocks Skills
Start
Build
- Styling and Responsive Design
- Global Styles and Design Tokens
- Conversion Workflows
- Dynamic Content
- Interactive Blocks and Forms
- Building a Website
- WordPress Editing and Publishing
Reference and Help