Skip to content
Climb Google Maps: Google Business Profile optimization.

WordPressPlaybook

How We Build WordPress Sites With Claude Code, Core Blocks Only, and What Broke

In October we rebuilt a vacation rental site in WordPress with Claude Code driving the real block editor: no page builder, no custom PHP, zero invalid blocks. Here is the method, the five WordPress 7.1 surprises that cost us time, and what we will test next now that Claude Fable 5.2 is out.

A row of blue wooden blocks with green blocks stacked on top

Key takeaways

  • We use Claude Code with WordPress by having it drive the real block editor in a headless browser, so every block is made by WordPress itself and stays editable.
  • In October 2026 we rebuilt a vacation rental site this way with core blocks only: no page builder, no custom PHP, no custom HTML, and zero invalid blocks.
  • The custom look came from Global Styles set over the REST API on the default Twenty Twenty-Five block theme, not from a theme written from scratch.
  • In WordPress 7.1, text alignment moved to style.typography.textAlign and the old attribute is silently dropped, one of five surprises that cost us time.
  • That build used a Claude Opus model; Claude Fable 5.2, released Nov. 9, 2026, is what we will test next on the planning and checking steps.

We use Claude Code with WordPress in a way that sounds slower than it is: instead of asking the AI to write page markup, we have it drive the real WordPress block editor. Every block on the page is created by WordPress's own code, checked, and saved. The result is a site that looks custom but that anyone can edit in the normal editor.

With Claude Fable 5.2 released on Nov. 9, 2026, people are asking what these models can build. This is what we have actually done, with the model we actually used, and what went wrong.

The project: a WordPress site with no page builder

In October 2026 we rebuilt a vacation rental site in WordPress using core blocks only. No page builder, no custom PHP, and no custom HTML anywhere on the site. Every word on every page stays editable in the standard block editor, which matters more to the owner than any design detail: they can change a price or a photo without calling anyone.

The model was a Claude Opus model, run through Claude Code. We didn't record the exact version, so we won't guess it.

How Claude Code drives the block editor

The usual way to get AI to build WordPress pages is to have it write block markup by hand. The trouble is that hand-written markup that is slightly off becomes an "invalid block" warning the moment someone opens the page in the editor.

So we didn't let Claude write markup. Claude Code:

  1. Opened the real WordPress block editor in a headless browser, a browser with no window, controlled by code.
  2. Made every block with the editor's own functions, createBlock() to build it and serialize() to turn it into the saved format. WordPress writes the markup, so it matches what WordPress expects.
  3. Parsed each page again after building it and confirmed every block came back valid.
  4. Saved the page over the WordPress REST API.

The result: zero invalid blocks across the site.

How the design was done without a custom theme

The look is a custom design on the default block theme, Twenty Twenty-Five, not a theme written from scratch. Claude Code set it through Global Styles over the REST API:

  • the color palette and layout widths
  • fonts, uploaded through the WordPress Font Library
  • header and footer template parts, with a sticky header

It reads like a custom-coded site, but it is plain Gutenberg underneath. For the owner, that should mean fewer surprises when WordPress or the theme updates, because there is no custom code to maintain.

Five WordPress 7.1 surprises

This is the part worth reading if you try the same thing. None of these were Claude's fault; they are how WordPress behaves, and each one cost us time before we understood it.

  1. Text alignment moved. In WordPress 7.1, text alignment lives in style.typography.textAlign. The old attribute is silently dropped: no error, the text just isn't aligned.
  2. Hiding a block on phones or desktops works through metadata.blockVisibility.
  3. The navigation block only collapses to a menu button below 600px. Long menus wrap onto two lines on tablets, so keep the main menu short or plan the tablet layout.
  4. A Custom HTML block made with createBlock() saves empty. It has to be parsed from markup instead. (The finished site has no Custom HTML blocks, but we hit this along the way.)
  5. var:preset|spacing|0 is not a real spacing preset. Using it doesn't just fail for that value; it voids the whole gap rule.

Our advice if you use Claude Code on WordPress: put lessons like these in the project's CLAUDE.md file as soon as you find them, so the next session doesn't rediscover them. Our guide on how to build a website with Claude explains that file.

The same approach runs this site and our own platform

WordPress isn't the only place we work this way.

  • This news site is produced by two scheduled Claude Code cloud routines, running Claude Opus 5.5 since Nov. 9, 2026. One picks and writes stories from primary sources; the other checks the live site every day and fixes broken links, outdated facts and layout bugs. Nothing goes live until the typecheck, the full build and a site audit pass. We described the editorial side in how we run a daily SEO news desk with AI.
  • Our own website platform for apartment communities is built with Claude Code and Claude Opus models: a Next.js site builder with a visual editor, an SEO panel, a map builder and more than a dozen design "looks." One script reapplies the same content under any look, so one building's site can be compared in many designs side by side.

The pattern in all three is the same. Claude does the building, and the checks decide whether the work is done: a block parser, a build, an audit. We trust the checks more than any model's own report that it finished.

What we will test with Fable 5.2

We haven't built anything with Fable 5.2 yet, and we won't claim to. Based on what Anthropic says it improved, better judgment on vague requests and better coordination of subagents, these are the steps where we expect a difference and will test first:

  • Planning a whole site before any block is made: page structure, template parts and what goes in Global Styles.
  • Long runs with many pages, where an agent has to keep going for hours and check its own work without drifting.
  • The hardest checks on this site, like confirming every fact in a draft against its source.

When we have run it on real work, we'll write up what changed, including what didn't.

Sources

Photo of Kiran Dasgupta

About the author

Kiran Dasgupta, Editor

Kiran runs Kihan Marketing, a web design, SEO and ads agency, and manages dozens of websites across real estate, home services and healthcare. He writes about SEO, AI search and paid ads news, and what it means for the people who run websites.