Project Zero

Theme.json

theme.json is a configuration file for themes that was introduced in WordPress 5.8.  It allows you to define and customise the appearance of your theme and editor.  It was primarily designed with block themes in mind, but is also used with classic themes.

Your theme’s theme.json file provides a centralised location to manage and customise settings, as well as define standards and best practices for design and accessibility.  By including these standards in one file, you can reduce the need for manual modifications.

Themes published to the WordPress repository will require a theme.json file, but you can get away with not having one in classic themes.   However, it is highly recommended that you include one, especially if it is for client or public use.

Try this time saver

To save time in generating a theme.json file, you may find the generator from WPTurbo useful.  Visit https://wpturbo.dev/generators/theme-json/ and follow the steps to generate your file.  You can then save it in your theme as required.  Alternatively, you can replace the features in the file in your Project Zero theme.

Join the conversation

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.