Blog · Gutenberg

Theme.json v3 in WordPress 6.6: What Theme Developers Need to Change

Jun 25, 2024By Vladimir Mrkela
Share LinkedInX
Theme.json v3 in WordPress 6.6: What Theme Developers Need to Change

WordPress themes use theme.json to control design settings and styles throughout the site, so changes to its format can affect both the editor and the finished pages.

As of June 25, 2024, WordPress 6.6 is in its release-candidate stage. The upcoming release is expected to support theme.json version 3, making the change relevant to anyone maintaining or developing a theme. See the WordPress 6.6 Field Guide for release-candidate details.

Understanding what the new version means can help avoid unexpected differences in existing designs and preserve compatibility with older WordPress releases.

Here’s what theme developers need to know about theme.json v3.

Review What Changed in theme.json v3

WordPress 6.6 is expected to introduce theme.json version 3. The schema remains familiar, but v3 changes how themes can override core font-size and spacing-size presets. Review those settings before changing the version number.

WordPress 6.6 is expected to introduce section styles, which extend block style variations to style selected blocks and their inner elements. The feature uses the v3 schema; see the official Section Styles developer note for its limits and setup.

appearanceTools is an existing theme.json setting, not a new v3 feature. Don’t treat it as a migration requirement; use it only if you want to enable the design controls it groups. See the official Appearance Tools reference.

Check version compatibility considerations before changing the version number. WordPress 6.6 is expected to support version 3, but older WordPress releases may not recognize its newer features.

Adopt v3 only when your minimum supported WordPress version is 6.6. A theme has one theme.json file; WordPress does not select separate v2 and v3 files based on its version. If you must support older releases, keep the compatible schema or ship separately maintained theme packages. Test your chosen support range on a staging site.

Set the theme.json v3 Schema

Once you’ve reviewed which v3 features your theme needs, set the version field in theme.json to 3. This tells WordPress which schema to use when it reads your file. Update the value, then check the file for valid JSON syntax before testing the theme.

Check What to do
Version Set "version": 3 at the top level.
Syntax Use a JSON validator to catch commas or brackets errors.
Schema validation Run WordPress checks to find settings the v3 schema doesn’t accept.
Version migration Keep a copy of the old file so you can compare changes.

Test the updated file in a local or staging site, not only in an editor. Confirm WordPress loads the theme without warnings, then review the editor and front end for unexpected changes. Fix validation errors before you deploy. The version number identifies the schema; it doesn’t automatically convert your existing settings, so make and test changes deliberately.

Migrate Presets in theme.json v3

Do not assume that theme.json v3 renames existing settings. Its documented migration changes concern default font-size and spacing-size presets. Compare your v2 configuration with the official v3 migration note before changing the version or preset values.

Before adopting v3, check whether your custom font-size and spacing-size presets use slugs that overlap WordPress defaults.

In v3, settings.typography.defaultFontSizes and settings.spacing.defaultSpacingSizes control whether core presets are shown and whether themes can reuse their slugs. Set the relevant option to false when needed to preserve the intended v2 behavior. The migration note also explains how v3 combines spacingSizes and spacingScale.

Don’t rename unrelated settings or change values just to match an example. Test the updated file with the WordPress 6.6 editor, and review any validation notices for remaining outdated keys.

If you support older WordPress versions, check whether your theme needs a compatibility plan, since those versions may not recognize v3 or its newer settings. Keep a backup before editing.

Check How v3 Styles Apply to Blocks

Check each block in the editor and on the front end to confirm its v3 styles appear as expected.

Then test style inheritance by changing a global setting and seeing which block styles update.

Inspect Block Styles

How do v3 styles affect individual blocks? Inspect each block’s settings in theme.json and confirm that your intended values reach the editor and front end. Review selector precedence and the effects of any section styles you add; do not assume that changing the schema version alone changes every selector. Check block specific styling and selector precedence before adjusting values.

  • Open a page in the editor, select a block, and compare its typography, color, spacing, and borders with your design.
  • Review the matching styles.blocks entry, then check whether a more specific selector overrides it.
  • Test nested blocks, such as buttons inside a group, because their styles may use different selectors.
  • Inspect the front-end markup and computed CSS to find which rule supplies each visible value.

Change one setting at a time, then refresh both views. Record any unexpected difference so you can trace its source.

Test Style Inheritance

Test style inheritance by tracing a value from the theme’s global styles to a block and its nested elements. Start with a simple setting, such as text color, in theme.json. Then open the editor and check whether a paragraph uses that color by default. Add a block-specific style and confirm it changes only the intended block.

Next, test parent style inheritance with a heading inside a Group. Change the Group’s typography, then see whether the heading inherits it or keeps its own setting. Repeat with nested block inheritance by placing a paragraph inside a Cover or Columns block. Check both the editor and the front end, since they can differ.

Finally, test an explicit user override. Confirm it wins where expected, and record any mismatch before adjusting your style rules.

Review theme.json v3 Presets and Tokens

Review the v3 preset schema first so you know how to define and use tokens.

Check how color and typography tokens map to your design settings, then confirm they work as expected in your blocks.

Finally, test the updated spacing presets to make sure your layouts keep the right gaps and margins.

Preset Schema Changes

In theme.json v3, presets still define reusable design values, and v3 changes how default font-size and spacing-size presets interact with theme presets. When you update a theme, check each preset’s location and supported fields against the v3 schema, then test the result in the Site Editor.

  • Review preset naming conventions, because names affect generated CSS variables and editor labels.
  • Keep each preset under the setting it belongs to, rather than relying on older, misplaced entries.
  • Use custom token registration only where the schema supports it, and avoid duplicate values that make maintenance harder.
  • Check theme.json validation and inspect the editor after changes, since valid JSON alone won’t confirm the settings behave as intended.

Make changes in a small batch, then compare the generated styles and available controls with your previous version. If a preset disappears, verify its nesting and spelling before changing theme code.

Document any renamed presets for teammates and child-theme authors. This keeps updates predictable and easier to debug.

Color and Typography Tokens

Once preset locations are clear, check how your color and typography tokens are named and grouped in theme.json v3. Use labels that describe their purpose, then confirm each value matches how you want editors to use it. Color palette tokens should cover your core brand colors and useful interface choices, not every shade you might need someday. Typography presets should name practical text roles, such as body copy and headings, with readable sizes and line heights.

Token group Example
Color brand
Color surface
Typography body
Typography heading

Review the editor to see whether these presets appear clearly and work as expected. If a token is confusing, rename it before other styles depend on it. Keep the set focused, so you and your content team can choose consistent options without guessing. Don’t add duplicate presets that differ only slightly; document special uses when needed. Keep names stable when you revise values.

Spacing Preset Updates

After you’ve set your color and typography tokens, check how your spacing presets are named and grouped in theme.json v3. A clear spacing scale helps you apply consistent gaps and padding across blocks, while useful preset naming makes choices easier to recognize in the editor. Review each value before you update your theme:

  • Group presets from small to large, so you can choose a size without guessing.
  • Use labels that describe purpose or scale, such as “Small” or “Section,” rather than vague names.
  • Keep values distinct, remove duplicates, and check that each preset fits real layouts.
  • Test presets in the editor, including on mobile, to confirm spacing remains practical.

If you use fluid spacing, check its minimum and maximum values too. Update block styles that rely on old preset names, then preview key templates before release. That helps you catch gaps caused by renamed tokens.

Compare Theme Styles in the Editor and Front End

To check whether your theme styles match on the front end, compare the same page in the Site Editor and in a browser. Open a page with several common elements, such as headings, buttons, links, and a group with a background color.

Use the Editor preview to inspect spacing, typography, colors, and control states. Then open that page in a browser at the same screen width.

Look for differences in font size, line height, margins, and content width. Check both desktop and mobile views, since responsive styles can change how elements wrap or stack.

If a style differs, note the element and where the mismatch appears. This makes it easier to trace the cause without guessing.

Test a few templates, too, because frontend consistency can vary between pages even when the editor preview looks correct.

Update Your Existing Theme Configuration

Before changing your theme configuration, make a copy of its existing theme.json file so you can restore it if needed. If your minimum supported WordPress version is 6.6 or later, set the version to 3 and review the font-size and spacing-size preset behavior described in the official migration note.

Treat configuration migration as a careful edit, not a reason to rewrite working styles.

  • Check color, typography, spacing, and layout settings for values that no longer match your intended design.
  • Move shared values into settings and keep style choices under styles, where they belong.
  • Remove obsolete entries, but preserve custom properties your theme still uses.
  • Run theme validation with a JSON checker, then inspect the file for duplicate keys and misplaced commas.

Make one group of changes at a time, save the file, and compare it with your backup if an editor reports an error.

Document any unusual choices so you can maintain them later.

Test Your Theme Across WordPress Versions

Test your theme on each WordPress version you plan to support, because theme.json v3 may behave differently in older releases.

Build a test plan

  1. Create a WordPress compatibility matrix that lists each supported release, PHP version, and test environment. Include WordPress 6.6, where v3 support is expected, plus older versions your users may run.
  2. Install your theme on a clean site for each release. Check that it activates, loads its styles, and displays templates, colors, typography, and spacing as expected.
  3. Test key editor flows, such as changing a style variation, editing a template, and saving a post. Compare front-end output with the editor.

Add these checks to your theme migration checklist. If you support releases that don’t recognize v3, verify your fallback plan before publishing. Record results and repeat tests after changes to theme.json or WordPress support.

Troubleshoot Common theme.json v3 Issues

When a v3 setting doesn’t work as expected, check that the JSON is valid and that your WordPress version supports it.

Then isolate the problem before changing several values at once.

  • Debugging invalid theme.json values: Check commas, quotes, braces, and value types. A color needs a valid color string, not an object.
  • Diagnosing editor validation errors: Read the full message, then confirm the setting belongs in the section where you placed it.
  • Compare your setting with the WordPress 6.6 schema. Remove unsupported keys or update their structure.
  • Test changes in a clean editor session. Clear caches, reload the editor, and check whether a plugin or child theme overrides your value.

If the setting still fails, reduce the file to a small working example, then add properties back one at a time.

This makes the cause easier to find.

Frequently Asked Questions

Does WordPress 6.6 Automatically Upgrade Existing Themes to theme.json v3?

No, WordPress 6.6 doesn’t automatically upgrade your existing themes to theme.json v3. You’ll need Manual migration and compatibility testing to update your theme’s configuration and confirm it works as intended.

Can a Theme Include Different theme.json Versions for Different WordPress Releases?

No, you can’t provide separate theme.json files for different WordPress releases; WordPress loads one file. For Version compatibility and release specific configuration, you’ll need to maintain separate theme packages or use compatible settings.

Do Child Themes Need Their Own theme.json v3 File?

No, your child theme doesn’t need its own theme.json v3 file. It inherits settings from its parent theme. Add a file only when you need Child theme configuration to override or extend inherited settings.

How Does theme.json v3 Affect Themes Distributed Through the WordPress.Org Directory?

You don’t need to resubmit solely for v3; WordPress.org themes can adopt it without changing distribution. During Directory Review, you should validate your theme, preserve Backward Compatibility for older WordPress versions, and update your documentation.

Where Can Developers Find Official theme.json v3 Documentation?

You can find official theme.json v3 documentation in WordPress Developer Resources and the schema in WordPress core’s GitHub repository. Explore core themes and documentation examples for Pattern registration, then use Schema validation tools to check your file.

Tags
  • theme development
  • theme.json
  • WordPress themes

About the author

Vladimir Mrkela

Vladimir Mrkela

Senior WordPress Developer

I’m a senior WordPress developer and co-founder of Pixel Industry. I’ve spent more than 12 years building websites, custom plugins, and integrations for all kinds of projects. I enjoy working on complex architecture, solving tricky problems, and sharing what I learn along the way.

Ready to build?

Have a WordPress project that needs expert judgment?

Get a Free ConsultationTell us about your project and we will get back to you soon.