After watching [Matt Mullenweg: State of the Word 2022]) with a demo of creating a block theme by customising the style of the blocks directly in Gutenberg it made me wonder what the workflow of creating a theme will be in the future.
There are many ways of writing themes from scratch but when I get a WordPress project or a site that would work well as a WP site I tend to create a theme with roughly these steps:
– Setup a repository with a blank theme (a template I already have)
– Create Gutenberg blocks that will be used to put the pages together according to the designs.
– Write styles and add interactivity in the source code.
> It’s worth keeping in mind that I do not use any React to create blocks, I use a template that allows for blocks to be instantiated by stitching individual components in Twig templates with Advanced Custom Fields. It’s called [Hozokit]).
> Nothing against writing React, it’s what I do the majority of the time but I do like simplicity and avoiding switching context between configuring Gutenberg blocks in React and writing PHP code allows me to put WP sites together, faster.
However, looking at the video it seems that custom sites would be able to be created by largely customising styles of blocks directly in the editor.
I do expect some code would have to be written depending on how developers would like to organise styles or add interactivity to elements but the page layout structure and what the site looks like seems to be persisted to the database and can be modified without changing code, rather than the source code deciding how it looks like having little control over it after deploying.
My question is, is the mental model of theme development moving on from an approach of coding it in a self contained “package” that when applied on a WordPress site displays the data layer in a certain way to developing re-usable blocks that can be brought to any theme and then the layout side of things and the order that those blocks/components are displayed on the site is decided via de editor in the admin panel?
Curious to what the rest of the community thinks about this and would appreciate your thoughts, thanks all. 🙏
[ad_2]
Block themes are useles for most website development scenarios. They are ok for blogs and few other things where you don’t rely on plugins too much, but nothing more.
Plugins interact with normal themes by using template actions/filters to add or modify content, and all that is removed from block themes. Filters like ‘the_content’, will not work in block theme and full site editing.
The only way to do something like that now, is hacking of the block rendering, which is a huge problem.
It would be years, for even a part of plugins to get fully usable blocks for block theme integration, and even with that, if plugins don’t have an easy way to modify things and add content, block themes will be useless for most use cases.
Not to mention, that even in WP 6.2, even with out of beta status, block themes and full site editing are very unstable and barely usable.