WordPress

Block Themes vs Classic Themes: Performance, Markup and Heading Control

Block theme vs classic theme is a choice about where your templates live, not a guarantee of speed. A block theme stores layout in HTML templates and theme.json; a classic theme renders PHP template files. Both can ship clean, fast markup. In my WordPress builds the deciding factors are payload size, heading control, and how reliably the theme survives editor changes.

By Saif Al Jahanwebdev-saif.com

What actually changes between a block theme and a classic theme

The difference is where layout is defined. A classic theme renders PHP template files from the template hierarchy — header.php, single.php, page.php, footer.php, functions.php and style.css — and runs The Loop backed by WP_Query. A block theme stores layout as HTML in templates/ and parts/, keeps global settings in theme.json, and ships reusable layouts in patterns/. There are no PHP templates to edit; WordPress resolves the wp_template post type at request time. I work in both models on webdev-saif.com, and I'm Saif Al Jahan, a WordPress and PHP developer in Mymensingh, Bangladesh (GMT+6). Neither approach is inherently faster: a lean classic theme with two enqueued stylesheets will beat a block theme that loads global styles, style variations and every core block asset. The reverse happens when a classic theme drags in a page builder.

  • Classic: template hierarchy files plus wp_head() and wp_footer() hooks
  • Block: templates/*.html, parts/*.html, patterns/*.php and theme.json
  • Block themes are detected from templates/index.html plus theme.json
  • Both still render the same post data through The Loop

Where block themes win on performance and clean markup

A well-built block theme gives me design tokens instead of scattered CSS. theme.json holds color, spacing, typography and layout keys — settings.layout.contentSize and wideSize, settings.typography.fontSizes, settings.color.palette — so the editor cannot inject arbitrary font sizes or colours that bloat the stylesheet. Core blocks emit semantic HTML: a main landmark, article elements, figures with intrinsic dimensions, and nav with aria-label. Because spacing and containers come from the layout attribute rather than floated wrapper divs, the DOM stays shallow. Style variations swap one JSON file instead of a whole theme. The practical performance lever is should_load_separate_core_block_assets: when true, WordPress enqueues only the CSS for blocks actually present rather than the full block library.

  • theme.json settings replace dozens of hardcoded CSS rules
  • layout.contentSize and wideSize produce consistent containers
  • core/image outputs width and height, protecting CLS
  • should_load_separate_core_block_assets cuts unused block CSS
  • Style variations in styles/*.json reuse one template set

Where classic themes still win

Classic themes win when control and predictability matter more than visual editing. I can hand-code one stylesheet, enqueue it with wp_enqueue_style() and nothing else, and know exactly what lands in wp_head(). There is no global styles payload and no block-library CSS unless the content requires it. PHP gives me precise filters: the_title, wp_get_document_title, excerpt_length and pre_get_posts all run before output, so heading text and template logic stay in versioned files. Legacy widgets, custom WP_Query loops and WooCommerce template overrides are simpler to reason about. For a store with heavy custom PHP, that predictability often matters more than the Site Editor.

  • One enqueued stylesheet keeps the critical CSS path short
  • PHP hooks control title and heading output before render
  • WooCommerce template overrides live in a familiar folder
  • No global styles payload printed into wp_head()

Keeping heading hierarchy intact in both models

Heading order breaks in predictable ways. In a classic theme the mistake is wrapping the loop title in an h2 because it looks smaller, then starting the content at h3. In a block theme the Site Title block is often promoted to h1 in the header template part while the single post template also renders its title as h1, producing two h1 tags. My rule is one h1 per document: on singular views it is the post title, and on home and archive views it is the site title or archive title. Everything below steps down one level at a time — h2 for sections, h3 for subsections. Visual size comes from CSS, never from the tag. I verify with the browser accessibility tree and axe, not by eye.

  • One h1: post title on singular, site or archive title elsewhere
  • Never jump from h2 to h4; style with CSS, not heading levels
  • Set the Site Title block tagName to p or div on singular views
  • Check the rendered accessibility tree, not the editor preview
  • Give each nav landmark a descriptive aria-label

The performance details that actually move Core Web Vitals

Theme architecture only matters through metrics. I budget LCP under 2.5s, INP under 200ms and CLS under 0.1 on a throttled mid-range Android profile. The LCP element is usually the hero image: give it explicit width and height, add fetchpriority="high" if it is above the fold, and keep loading="lazy" on everything below it. Defer non-critical JS by enqueuing scripts in the footer. In block themes global styles print inline, so I keep theme.json lean; in classic themes I inline critical CSS and defer the rest. Fonts use font-display: swap with a small subset. Those choices affect the score far more than the template model does.

  • LCP under 2.5s, INP under 200ms, CLS under 0.1
  • Explicit width/height on every image; fetchpriority on the hero
  • font-display: swap on self-hosted fonts
  • Load only the block CSS for blocks present on the page
  • Test on throttled 4G with a mid-range Android device

How I choose for a real client build

I start from the editing workflow, not the benchmark. If the client wants to compose pages visually with patterns and style variations, I build a block theme with a tight theme.json and a reviewed set of templates. If the site is a WooCommerce store or a custom PHP application with unusual query logic, I keep a classic theme and use blocks inside content only. A hybrid works too: a classic theme can register block patterns with register_block_pattern() and support reusable layouts without Full Site Editing. Whichever route I take, I ship a heading map with the theme so future editors know exactly where h1, h2 and h3 belong.

  • Block theme for pattern-led marketing sites with visual editing
  • Classic theme for WooCommerce overrides and custom PHP logic
  • Hybrid: register_block_pattern() inside a classic theme
  • Ship a heading map with the theme handoff

Frequently asked questions

Are block themes faster than classic themes?

Not automatically. A block theme can load global styles, style variations and core block CSS; a hand-coded classic theme can ship a single small stylesheet. Speed comes from what you enqueue and how images and fonts load. I compare the rendered asset list and Core Web Vitals on the actual build rather than assuming the theme model decides it.

Do block themes produce cleaner HTML?

They can, because core blocks emit semantic landmarks and avoid the nested wrapper divs that page builders add. But a badly assembled template part can be messier than a tidy classic theme. Clean markup comes from reviewing the rendered DOM: one main landmark, labelled navs, no layout tables, and a heading order a screen reader can follow.

How do I stop two H1 tags in a block theme?

The usual cause is the Site Title block set to h1 in the header template part while the single template also renders the post title as h1. Set the Site Title tagName to p or div, or make it an h1 only in the front-page template. Keep one h1 per view and use CSS for visual size.

Can I use blocks without switching to a block theme?

Yes. Blocks work inside the content of a classic theme, and you can register your own layouts with register_block_pattern(). You won't get Full Site Editing templates or theme.json global styles driving the whole site, but you keep PHP templates and a smaller asset footprint.

Which model do you recommend for a WooCommerce store?

For most stores I keep a classic theme, or a block theme with carefully tested WooCommerce block templates. Product archives, cart and checkout have template overrides and hooks that are easier to control in PHP. I decide after checking the exact plugins in the stack, not from a preference for one model.

Written by Saif Al Jahan, webdev-saif.com · Mymensingh, Bangladesh. Last updated .