One of the more consequential features of WordPress 5.8 I didn’t pay much attention to before it was released was
theme.json. Which is “just another file in your WordPress theme” but also a whole lot more. I’ll just quote Jeff Ong from over on WordPress.org:
Conceptually, [theme.json is] a major shift in how themes can be developed. Theme authors now have a centralized mechanism to tailor the WordPress experience for site authors and visitors. Theme.json provides theme authors fine-grained control over global styles, block styles, and the block editor settings.
By providing these settings and controls in a single file, theme.json provides a powerful framework that brings together many aspects of theme design and development. And as the block editor matures and adds more features, theme.json will shine as the backbone for themes and the editor to work together.
Definitely something to play with, even if you just make simple themes like me. I think it’s mostly clearly vital today as something for commercial themes (much like the “editor styling” from ~10 years about). But I love how centralized (a part, at least) of WordPress theme’s future will be. I’m expecting the importance of this file will only grow ?
Keep reading the article at WPShout. The article was originally written by David Hayes on 2021-08-05 18:49:34.
The article was hand-picked and curated for you by the Editorial Team of WP Archives.