This is new in WordPress 5.8

WordPress 5.8 is scheduled to be released on July 20, 2021. Among other things, the new version introduces an interesting file for configuring the block editor, as well as the first functions towards full-site editing. We took a look at the new functions.

theme.json

  • Allows theme developers to:
    • configure the editor (things like color palettes, available font sizes but also enabling or disabling features),
    • set default styles,
    • to do more things in the future.
  • Settings and styles can be specified both on a global level for all blocks and granularly for individual blocks. For example, a global color palette can be specified and another for the group block.
  • WordPress generates class names and CSS variables from many of the settings so that the styling takes effect directly.
  • In addition, the available templates in block-based themes can be defined via it.
  • With remove_theme_support( 'block-templates' ); can be prevented with a theme.json the template editor is activated.
  • Not necessary for existing or new themes, completely optional.
  • Left

Block based widget editor

  • Widgets are now also blocks, the view under Design › Widgets and in the Customizer have been revised accordingly.
  • The blocks appear more or less (depending on the theme) as they appear on the website.
  • The existing core widgets have been moved to blocks and in addition all other available blocks can be used in widget areas, just like in the normal post/page editor.
  • “Old” widgets are displayed in a legacy widget block, but new block widgets are also carried over to the old view if the old view was activated after using the new view.
  • Mode can be deactivated via
  • Make contribution to the new widget editor.

Block API Changes

Full site editing blocks

  • There are a number of new blocks needed for full-site editing:
    • website title and description,
    • website logo,
    • post title,
    • archive page title,
    • query loop,
    • exception,
    • post content,
    • author
    • date
  • The navigation block is not included yet.
  • There is a duotone filter for the image block.

Two examples of the duotone effect. (Screenshot: sworg)

Load block styles only for existing blocks

  • A feature that must be explicitly enabled.
  • The core block styles are then split into one style sheet per block and only included when a block is used on the page.
  • For classic themes, the styles are loaded in the footer because it is too late to know which blocks are being used. With block themes, they continue to load normally in the head.
  • Developers could also use the function to split their own styles for blocks into individual files and attach them to the core files.
  • More information on this and other changes in the make post on style loading improvements.

Template editor (no site editor)

  • allows editing and creating templates for pages and posts, such as page templates.
  • Limited use without the navigation block (or we don’t get it right).
  • The blocks in the template editor are loaded in an iframe as opposed to the view in the normal content editor.

If you want to try full-site editing, you need

various