The new Gutenberg Editor is only the beginning of the revolutionary project and represents the first phase in the future of WordPress. In this article I show what could be implemented by Gutenberg in the next phases after the release of WordPress 5.0.
Review of the State of the Word
The co-founder of WordPress, Matt Mullenweg, gives his speech at the end of each year on the current status of WordPress - the State of the Word. You can watch Matt's complete appearance at WordCamp US in Nashville in December 2017 in the following video or read the practical summary on KrautPress .
At the end of his talk, Mullenweg presented his goals and focus for 2018. As in 2017, this will continue to be on the Gutenberg project.
He speaks of the implementation in three successive phases:
- Gutenberg editing
- Gutenberg Customization
- Gutenberg theme
After having reported several times on the current status of the Gutenberg project, I would now like to take a closer look at the future. In particular, what could the next phases of Gutenberg look like?
Phase 1: The Gutenberg Editor
We are currently in the first phase. This is where the new Gutenberg Editor will be implemented, which version 5.0 will be released this year.
The basic principle of the blocks is introduced. In the future, the content of a post or page will be “assembled” from these blocks. While it initially only looked like a new WordPress editor, features that are reminiscent of Page Builder were soon introduced , e.g. a block for several columns.
The container in which blocks can be inserted and used is the content area of a WordPress post. The blocks are displayed in the theme at the point where the the_content () function is called.
Phase 2: Gutenberg Customization
In phase 2, the blocks will be rolled out to other areas than just the content of posts. The goal will be to be able to create the complete layout of the website with Blocks.
Everything becomes a block
That's why Blocks will initially replace other elements of WordPress. Presumably, widgets and menus are first exchanged by corresponding blocks and can be added and edited in the customizer.
Building on this, the complete theme layout of a website with blocks will probably be feasible. Therefore almost all elements of a website will be made available as a block. Blocks for the logo, header image, page title, pagination, comments, author bio etc.
A quote from Gutenberg's Phase 2 can be found in the forum:
Phase 2 of Gutenberg replaces widgets, menus, and allows for theme layout in the customizer. This means that users can learn things once, and developers can write things once, and have them work all over the site instead of (for example) creating a shortcode for the editor, a TinyMCE plugin to have an interface for it, and a completely separate widget to do the same thing, and a separate interface for that.
Matt Mullenweg in the WordPress.org forum
Here, too, one of Gutenberg's goals becomes clear. To unite the numerous concepts of WordPress such as menus, widgets, editor and shortcodes in a uniform interface - the new blocks.
Blocks can be inserted anywhere
In addition to the introduction of many new blocks in the second phase, the possibilities of where blocks can be used will also be expanded.
My guess is that themes will play an important role in this. At the moment themes can define different widget areas or also define positions in which navigation menus can be displayed. In the future, these areas will instead allow blocks to be inserted.
Blocks leave the context of the editor and are no longer restricted to the content of posts or static pages. The tool to add and edit blocks in different places on the website will become the customizer.
I am also assuming that in the future, theme developers will be able to provide new areas for inserting blocks in template files with new functions, similar to the widget areas currently. One possibility is described on Github in the issue of block templates .
A template for blocks could look like this in the theme:
<body> <?php do_blocks( array( // Theme header: "blocks/header/index.php" do_block( 'theme/header' ); // A core text block do_block( 'core/text', array( 'placeholder' => 'Fill some text here...' ) ); do_block( 'core/post-title', array( 'id' => get_post_id() ) ); // A post block: renders the_content do_block( 'core/post', array( 'id' => get_post_id() ) ); // Theme footer: "my-theme/blocks/footer/index.php" do_block( 'theme/footer' ); ) ); ?> </body>
At the moment, themes call up a large number of different functions to display content. Widgets are displayed with
dynamic_sidebar() , menus are displayed with
wp_nav_menu() , content is output with
If the current concepts of WordPress are standardized as blocks, the theme of the future could only
do_blocks() to output blocks instead of countless template functions. At the moment this is pure speculation on my part.
Phase 3: Gutenberg Theme
In the last phase of Gutenberg, a new default theme for WordPress is to be created, i.e. TwentyNineteen or TwentyTwenty. This third phase will probably even take place relatively parallel to phase 2 and both will be published with a release.
With phase 2, themes can probably be implemented largely with blocks. Instead of menus, widgets and posts, almost all components are then possible as blocks and the template files of the theme only specify the arrangement and layout of the blocks.
The problem: There are still no themes that can use all the new options. Therefore it is only logical that in the last phase a new default theme comes, which is based on the new blocks and exploits all Gutenberg features.
Matt Mullenweg on the 3 phases of Gutenberg
In an interview by the AdvancedWP Facebook group with Matt Mullenweg, he presented the three phases in more detail than in the State of Word. You can find this passage from minute 17.
Here is his statement in the interview in text form:
The phases - so I think - are important to understand, so I'm just gonna repeat that. Right now everything we're doing is phase one of Gutenberg. So that's saying we're going to replace the editor with this block-based new API driven interface. But the blocks are kind of like the most magical thing. That's like why it gets really exciting. Because once we have these blocks in the editor, we think - actually way faster than Gutenberg - we can bring them to other parts. So the next step is saying "Can we replace widgets, then menus with blocks?". So essentially those become blocks. And you kind of can lay out your sidebar, footer areas, and in the future your entire theme with these blocks.
While phase 1 is nearing its end and will soon be completed, the next phases are still completely ahead of us. Therefore, there are currently only a few ideas from various developers. Which features will be implemented and what they really look like will only be shown in phase 2.
The rough direction can already be seen now. The more I've dealt with Gutenberg in the last few weeks, the more I realized how fundamental the changes will be for WordPress and the editor is actually just the beginning.
For me as a theme developer, phases 2 and 3 will definitely be really exciting. I will soon write another post about the effects on WordPress themes. Interested? Then subscribe to my newsletter.
I wish you all a Happy Easter!