WordPress themes have been stuck. It wasn’t their fault they were being asked to do so much and often had to pretend they were plugins. The end result of this was seen in code weight, style stagnation and generally a lack of excitement around themes compared to the years gone past. I don’t say this to call anything out specifically, it was a situation of circumstance. It is a situation changing and one of the huge factors of that is theme.json which is bringing the first major theme process change to core in years.
The power of changing process
Theme json if you aren’t aware if this magical little file that can sit in your theme and send all kinds of amazing presets to the editor, using global styles for example things spark alive in the full site editor. This post though isn’t a ‘how to’ about theme.json, it’s about how the use and existance is a process change that not only brings us closer to the rest of front end development, but unburdens themes.
A statement to make
I am very aware that saying ‘first major theme process to core’ in years is quite a statement. Theme.json to me is that though. I don’t say this ignoring iterations and improvements, WordPress is a project flowing with the energy of those. However, themes were on life support stuck in a land when the rest of front end development was moving on. It wasn’t for some trying to change that, mostly when they did the time wasn’t right and as it didn’t come from core it was always a harder change.
Block based template parts and templates are a companion to theme.json, to make a block based theme – that’s a lot of blocks. I am therefore, aware in just calling out theme.json that it might seem a little unexpected. Theme.json though seperates style from form. It allows thinking of the art direction, the true effect of the theme. This is a mental model shift. You aren’t patching at the CSS level, you are thinking holistically. Combine that with the other tools and you’ve got a powerful combination.
The burden of themes
For years, most themes had PHP, HTML and CSS. Then along came JS, with at the start a few jQuery scripts and overtime some rolling of the theme author’s own. Many use Sass.. there’s a stack to theme creation that grew more and more over time. With each thing added the burden got more, the hurdle to learning more for those coming in.
We not only were creating more issues for ourselves in creating themes, as we navigated around more complex interfaces, but we were putting walls in the way of the knowledge. I remember like so many viewing the code of Kubrick, it was how I learnt themes. We had reached a point where honestly, I am not sure how you’d learn themes.
Not just adding but removing
I am aware as I type making it sound like this is all a simplification magic wand, that I am using language that sounds technical. Even the notion of a JSON is ‘another thing’. However, what theme.json is doing isn’t just adding another thing, it’s allowing to remove a lot of other things to. This is one of the key points.
There is also a readability to the way theme.json is created, kudos to those that worked on it. It flows, it makes sense and because it’s core there is an incredible documentation effort underway.
Putting themes back in the hands of designers
I am incredibly excited to not just have those designers that code be able to make themes. Whilst we are great, the designs that haven’t been able to be made into themes make me so sad. The designs that sit waiting for a developer, or that a designer couldn’t turn to their vision because the tools weren’t there.
Theme.json, it’s friends block templates and parts, start us on the road to that by being part of the process of full site editing. It’s not quite there, but eventually no-code themes will be possible and that is going to see I hope those designers free to create their theme dreams.
For those of us that do dabble in code, these new processes take the hard work out of themes, they free us to be creative. To truly explore and that can only lead to incredibly exciting things.
The start of something
I see theme.json as the start of things in many ways. There are going to be so many iterations and exciting tools along the way. Themes can get back to being just themes and that can only be good for WordPress because that’s when they can be beautiful, inspirational and creative.