The introduction of full site editing (FSE) in WordPress highlights the growing importance of the theme.json file. There is now a whole new hierarchy and structure to understand, along with the various properties to help you create your designs. In particular, the blocks property in theme.json is essential if you want to create modern, flexible WordPress themes with unique Blocks.

In this guide, we explore the ins and outs of the blocks property in theme.json so that you can work with, design, and style Blocks to create more dynamic and customizable WordPress experiences.

Understanding the blocks property in theme.json

Before we dive into the intricacies of the blocks property, let’s first understand its role within theme.json and WordPress theme development.

Twenty Twenty-Three’s theme.json file.

First, theme.json is the configuration file that lets you define global styles and settings for your themes. This “central hub” lets you control various aspects of your theme’s appearance and behavior, including typography, colors, and layout options. However, it can do more than simply give you programmatic cosmetic tweaks.

The blocks property lets you apply granular control over individual Block types rather than the site as a whole. You can define default styles, settings, and behavior for specific Blocks, which ensures consistency across your theme and flexibility for site owners.

The relationship between the blocks property and full site editing

FSE is a more visual approach to building your site with Blocks at the core. On the front end, you have most of the styling and customization options available to your overall site:

The WordPress Site Editor main screen, showing a blue home page with the title,
The full site editing interface within WordPress.

The blocks property is a crucial part of the theme.json file for a few reasons:

  • It provides a standardized way to define block styles and settings.
  • You’re able to create cohesive design systems from a programmatic base.
  • You can offer greater control over the appearance of Blocks without the need for custom CSS.
  • The property helps you create Block patterns and templates.

Developers can use the blocks property to create themes that make the most of full site editing.