WordPress 5.9 "Josephine" is here and the novelties in this version appear to be a very big change in the way the themes for the platform have been created and used so far.
The complete editing of the site with block themes is the biggest novelty in this version, others are - the new theme Twenty Twenty-Two (2022) and the new block Navigation.
Block themes in WordPress 5.9
The first step towards the complete editing of the site with blocks was made in the previous version 5.8 of WordPress - by editing the widgets with the block editor.
In this version 5.9, in addition to the widgets with the block editor, you can edit the entire theme of the site. Which means the option for complete editing of the site.
What is a block theme?
A block theme contains separate block templates in which there are blocks. Templates may include other sub-templates called Template Parts.
Templates are, for example, the main types of pages on the site - single, page, category, archive, and others. Parts are smaller block templates such as header, footer, sidebar, which are added to the main templates.
The smallest building block is the block. The grouping of several blocks is done in the block templates. Grouping at a higher level (of blocks and block templates) is done in the main templates of the theme.
Only one of the differences with the previous (already called classic) themes is in the code contained in the templates.
Template files are no longer PHP, but HTML files. Here is an example structure of a block theme:
Example header.html block template code:
Block themes in the official directory
There are already several block themes in the theme directory in wordpress.org: https://wordpress.org/themes/tags/full-site-editing/.
To see all block themes, filter the results by the Full Site Editing tag.
They are still few in number, compared to the classic themes, but these 37 block themes were available before the release of the new version 5.9 of WordPress (from which you can actually use block themes on the site).
We can certainly expect that the number of block themes will increase dramatically very soon. We will also see the emergence of many paid block themes.
Twenty Twenty-Two - the first block theme in WordPress
With WordPress 5.9 comes a new default theme - Twenty Twenty-Two. This theme is made up entirely of blocks. With it, you can test the new functionality for complete editing of the site.
Edit the site through Site Editor
If you have already edited content with the block editor, for example, you have added and moved blocks in an article, then editing the block themes is almost the same thing, only at a higher global level, at the site level.
The big difference with editing an article is that there are several special blocks for the block theme that can be used, such as Site Title, Template Part, Post Content, Post Title, Post Date.
Editing of the whole site (block templates) is done through Site Editor (available through Appearance »Editor or through Edit site from the frontend).
The editor has three modes - editing the site, editing templates, and editing parts.
Editing the site and templates is the same as when editing, for example, the content of an article or page - we add blocks, rearrange them, group them, and all the other manipulations we can do with the blocks.
Template parts are added to the block template with a special block - Template Parts.
Block theme design settings
In addition to the structure of the site and the pages, the global theme settings can also be used to manage the global theme settings.
The options can be found in Styles.
The entire design of the site can be edited by this option - colours, fonts, parameters of the details in the layout.
Apart from that, you can customize the settings of the blocks themselves.
The block editor
The news in the block editor comes from 12 versions (10.8-11.9) of Gutenberg.
There are many improvements and interesting innovations, here are just a few:
New Navigation block
New options for the design of the text in the blocks have been added: space between the letters, line height, font style (density), case of letters (only uppercase, only lowercase, uppercase and lowercase);
New option for adding a border of the Group block
Conclusion
With each new version of WordPress we see new features, enhancements, improvements, and we see all of this with WordPress 5.9. All you need to try out the new features is a block theme, like the new Twenty Twenty-Two default theme, and you are good to go.
Nadejda Milanova
An experienced Content creator in the field of Search Engine Optimization (SEO) and WordPress. A true proffesional with a Master's degree focused on journalism.
Read more by Nadejda Milanova