Categories
WordPress

Block Based Themes

Who decides the future of themes in WordPress?

I remember back when Gutenberg was still in beta, we were talking a lot about what the block editor would mean for the future of WordPress.

Would blocks be distributed in themes, or in plugins? What would Gutenberg look like if it were combined with the Customiser? Should widgets be blocks (and if so, what about the header logo, or copyright colophon)?

This week we started to get some early rumblings of answers to these questions. Riad Benguella created a Pull Request to the Gutenberg GitHub repo, proposing an experiment for completely block based themes.

It described something very important! The future of themes in WordPress! Unfortunately, it was published on GitHub, and to read it, you needed to view the changeset and parse the markdown. Of course, the WP community doesn’t read every new PR that comes through the Gutenberg repo – so this could have easily flew under the radar.

But we got lucky – it caught the attention of Justin Tadlock over on WP Tavern, which drew some attention to the PR.

This Pull Request has been met with a considerable degree of concern. I wanted to take the time to write about this from the perspective of:

  1. What does this experiment look like?
  2. Why is there resistance to the idea?
  3. Where do we go from here?

What does this experiment look like?

Sorry Riad! I think a large part of the problem here is that this first documentation on block based themes is actually quite difficult to understand. I spoke to a few different people who couldn’t quite wrap their head around it.

Here’s my interpretation:

Let’s start by imagining that blocks could be used as widgets. You could add, say, a Quote block to any one of your widget areas.

Actually, you don’t have to imagine this – just activate the Gutenberg plugin and enable Widgets under Gutenberg > Experiments.

Okay, makes sense so far. Now imagine replacing your footer with a widget area. Chances are, your footer already contains one, so this shouldn’t be too hard. But instead of a © section at the bottom, imagine this is a paragraph block instead, and there’s an interface in the WP Admin to change the text displayed here.

Now, did you know that in the latest version of Gutenberg there’s a “Navigation” block? This is what it looks like:

So, now we could easily replace the navigation in our header with a widget area, and insert the Navigation block. While we’re there, we could insert our logo as an image block, and align it to the left.

At this point, the name “Widget Area” isn’t such a great fit. Let’s call it a “Template Part” instead. We’ll have Template Parts like Header, Footer, and Sidebar.

Hey, now that we’re thinking about it, don’t forget that WordPress 5.3 introduced Group blocks. We could use these to do something pretty cool…

Start with a completely blank page. Nothing on it – no header, no sidebar, nothing. We could add a group block to the top, and make that our Header Template Part. Then below that we could add another Group Block, and expect the Post Title and Post Content to be added there. Maybe another Group Block next, and put Comments in that. Let’s finish off with a Group block for the Sidebar Template Part, and then a Footer Group.

We’ll call it “single”. It will be structured something like…

  • Group block
    • Header Template Part
      • “Logo” image block
      • Navigation block
  • Group block
    • Post Title block
    • Post Content block
  • Group block
    • Comments block
  • Group block
    • Sidebar Template Part
      • Search block
      • Categories block
  • Group block
    • Footer Template Part
      • “Copyright” paragraph block

(Notice our Template Parts are kind of like reusable block groups.)

This is called a Block Template. We could create it in some sort of Template Editor in the WP-Admin, and export it to be used as a theme.

So themes would be responsible for three things:

Style

This includes the structure of how the Template Parts fit together visually, as well as styles for all blocks (they might even be styled differently in different Template Parts).

Block Templates

Not dissimilar to current theme templates, and maintaining adherence to the Template Hierarchy, these describe the overall structure of the page, in the language of blocks (especially Group blocks) and Template Parts.

Template Parts

The theme should probably add some default blocks: a logo and navigation to the header, and a paragraph with copyright text to the footer. Even though these blocks could be easily changed and removed by the user, the theme should include a starting point. These defaults belong in a Template Part, and the Template Part is included inside a Block Template.

Hopefully that makes things a little clearer! For those of us who have been using traditional WordPress templating for the past decade or more, this is quite a tough change to wrap your head around. 💫😵💫

Why is there resistance to the idea?

Aah… politics. Unsurprisingly, there’s some #wpdrama going down because of this proposal. Some of it is based on simple misunderstanding (a.k.a. poor communication), but there’s more to it than that.

The subtext here is that Riad works for Automattic. I won’t dive into the history of WordPress and Automattic, suffice to say that their CEO leads the WordPress project¹, and as such, there is a constant concern from the community when Automattic approaches conflict-of-interest boundaries.

So, when an Automattician makes a giant proposal on the future of theming in WordPress, which gets merged into the Gutenberg project the very next day², I think it’s very reasonable that people are concerned.

Here’s a timeline of how it went down³:

September 5: Automattician Matías Ventura publishes a Make WordPress post describing full site editing with blocks. It’s met with a lot of positivity, but doesn’t include much detail on technical implementation.

September 23: Google employee Felix Arntz created an Issue in the Gutenberg Github repo describing Matías’ post. The 15 comments on that issue (before the PR on December 4) were all made by Automattic or Google employees.

December 4: Automattician Riad Benguella creates a PR for documenting the experiment. There is some early concern from Joy Reynolds (a well-known WordPress core contributor), but there’s no time to discuss it further, because…

December 5: Automattician Enrique Piqueras approves the PR just 24 hours later!

December 5: Riad merges the PR (the day after it’s proposed).

Notice a pattern?

The people with power all work for Automattic and Google.

It seems fairly clear to me why there is so much resistance to the idea. I believe it’s because:

  1. The experiment was poorly explained, and widely misunderstood.
  2. There wasn’t any opportunity to understand the technical implementation.
  3. There wasn’t any opportunity to discuss it either.
  4. The whole project is being rushed through by Automattic (with some help from Google).
  5. Feedback / concern is being brushed aside or hand-waved away, instead of properly discussed.

December 5: Hours after this PR is approved, Derek Hermann chimes in. Derek has been contributing to WordPress for years. Over that time he was a feature lead on the Customiser, worked with me to build Tide, and has been very active in Gutenberg’s development. He’s also the CTO of XWP (one of the largest WordPress VIP agencies in the world).

Derek has some real concerns, and lots of questions, which Matías tries his best to answer (although to be honest, Matías’ answers left me even more confused). Derek’s Github comments get lots of 👍 and ❤️ support. Even so, nothing changes.

Derek’s most important question is this one:

You have to research what the users want, not what the team wants to build. Where is your research?

Which brings me to…

Where do we go from here?

Alright, now we start to get into the territory of my opinion. Of course, you’re entitled to agree or disagree – take it up with me on Twitter if you like.

So, in my opinion, the entire experiment should be reverted.

The perception is that Automattic is working on Block Template themes in the shadows. Why? Do they see themselves as pioneering a future that we don’t yet know we need?

The rest of us need to be looped in to the decision making process.

Reword the document in this PR as a proposal, and post it on Make WordPress for feedback. The first Make WordPress post from Matías contained very few technical details.

Allow time for discussion! Put it on the agenda for the Editor Chats that happen every week.

Help the community to understand what this looks like – because clearly nobody does right now.

Most importantly, research how Users, Agencies, and Theme Designers want to engage with themes in WordPress. Make a decision based on that research, not based on a handful developers best guesses at how a block based themes should be implemented technically.

Merely asking for feedback is just not good enough. If nobody responds, that doesn’t mean you get to decide for yourself. That’s not how research works.

Maybe a developer tool isn’t the best place to ask for feedback on the future of WordPress. We can’t expect our community to learn GitHub, and follow the discussions happening across nearly 20,000 issues.

Maybe, if we facilitate a friendly, open, and wide-reaching dialog, we might arrive at different conclusions.


Important note: Nobody involved here is being intentionally malicious or hostile. I believe we have a problem with structure and power dynamics, which is what I’m trying to call attention to (not the individual developers).

I reached out to Matías and Riad and get their feedback before publishing this article.

Riad also offered these thoughts:

The reality is that I’d love more contributors that are non-Automatticians, but the reality is that a big part of WordPress contributors today are Automatticians. If you’d like to join our team and work with us to improve the proposal or change it you’re welcome.

There’s no shadow here . This was discussed for more than a year now in different Github issues by different people and regularly on #core-editor weekly meetings (which I invite you to join to discuss the proposal and help).

In chatting with Matías, he noted that the proposal for block templates has been discussed for a really long time in multiple places — there are GitHub issues from all the way back to 2017.


1. Matt Mullenweg, CEO of Automattic and co-founder of WordPress, is known as the “Benevolent Dictator for Life” of the WordPress project.

2. Actually, the experiment itself was merged a while ago – what we’re talking about here is only the documentation about the experiment. To be aware that any of this was happening, you’d have to be following along on GitHub.

The reason this PR was noticed was because the part that got merged was Documentation – thankfully a bit easier to understand than trying to string together multiple conversations between PRs, issues, and code. Even as it was, though, this could have easily gone under the radar if it weren’t for Justin picking it up on the Tavern.

3. There was also a call for feedback published on the Make WordPress blog, on November 3. I didn’t include it in the timeline because block based themes are just one line item among many – easily lost on a Make post that seems to have gone mostly unnoticed.