WordPress 5.9 with block themes and better lazy loading

With its update to version 5.9, WordPress not only brings more themes, but also “block themes” that enable full-site editing, laying the foundation for new possibilities. In addition to an extension of the range of functions in the Gutenberg editor and a performance optimization, there are also new hooks – with which developers can hook into certain places in the code and execute them – and queries for editing databases.

WordPress remains true to its tradition: This time there is a new standard theme, which is named after the new year. The block theme “Twenty Twenty-Two” allows full-site editing for the first time – the block themes basically provide a kind of framework, the rest of the design should then be realized by the user with the help of Gutenberg blocks.

In the meantime, the block functionality of the Gutenberg editor has progressed so far that users with the new WordPress version can not only insert different content such as text, images or galleries. It is also possible to access all page elements such as the header area with navigation menus and page logo or the footer area – the page templates can also be designed in this way. The response in the community is divided in this regard: while one group is looking forward to the new possibilities, the other group fears the problems that inexperienced users could cause with full-site editing.

Twenty Twenty-Two also brings a dozen new theme blocks for loading dynamic content. This eliminates the traditional design options such as customizers, widgets, menus and so on. All areas are controlled or adjusted by templates. For users of classic themes, nothing changes in this area with the update. The changes only apply when using a block theme.

WordPress 5.9 promises a performance optimization, especially through improved lazy loading. Lazy loading has been part of WordPress since version 5.5. With this technique, the images and iFrames on a website are loaded with a delay: only when they move into the visible area of ​​the screen. The implementation of this technique has massively improved the performance of WordPress in the frontend area.

In itself, this delayed loading is a useful function, especially on devices with smaller screens it prevents unnecessary downloading of components. However, it is precisely this loading behavior that causes problems in certain scenarios. For example, a transition page or a one-pager consisting of several images. Here it would make sense for all graphics to load at the same time, because loading delays are irritating when building the one-pager.

But there are other implications: The default setting to load all images with a delay resulted in poorer performance on the Largest Contentful Paint (LCP) metric. Google defines this as “the rendering time of the largest image or block of text visible in the viewport, relative to the first page load”.

The LCP lagging issue is addressed by a fix in WordPress 5.9. This fix prevents delayed loading of images above the visible area. In addition, the first image in the content does not get loading=”lazy”. Although this fix is ​​currently only an all-round blow, a test on 50 popular themes resulted in massive improvements in performance, in some cases up to 30%. By introducing lazy loading and by supporting the WebP graphic format, WordPress has greatly improved the loading time in most cases. The current innovation will bring another performance boost.

WordPress 5.9 brings new blocks to the Gutenberg editor and improvements to existing blocks. The navigation block, which can now be designed very flexibly, deserves a special mention. It is more likely to be used in the context of the new block themes.

The expansion of the gallery block is interesting for all users. Here, individual images within the gallery are now treated equally with individually inserted images. This means that users can design galleries very individually and that the images within a gallery can also “behave” differently. Until now it was only possible to provide information that then applied to all images.

WordPress 5.9 also brings new hooks, features and a language switch on the login screen. In addition, capability queries can be used to find users with certain rights – for example, when filtering out users who are able to edit certain types of posts. As always, there is a complete list of what’s new at wordpress.org.

See also:

  • WordPress: Download quickly and securely from heise.de

(gref)

To home page