In this lunchtime #WPQuickies, I’ll be looking at the new WordPress Template editor that shipped with version 5.8. This new editor was released in WordPress 5.8 and is part of the journey to Full Site Editing (FSE).
WordPress Full Site Editing (FSE)
Let me qualify by saying that WordPress 5.8 does not come with Full Site Editing (FSE).
The FSE scope is a collection of projects that, when put together will allow site admins to edit all components of the website.
We’re not there yet.
The template editor is the first public release of part of this process and follows the current WordPress development cycle of chuck it out there and hack it until it works approach.
I’m not a fan of that methodology, but it is what it is.
So WordPress 5.8 doesn’t have a complete or perfect FSE experience right now, but we can expect new blocks and features to be slowly trickled into subsequent releases.
What Is the Template Editor?
The template editor provides a way to create post and page templates using blocks.
Traditionally WordPress templates are PHP theme files, created by a WordPress designer or developer.
This new method of creating a template is the first attempt to simplify the process by using a block editor.
If you have a block-ready theme, the new template feature will be available to you from the sidebar settings.
If you don’t have a block-ready template, you will have to add the following line of code to your child theme’s functions.php file and refresh the post editor window.
add_theme_support( 'block-templates' );
Similarly, if you have a classic theme and you don’t want authors, editors and above being able to use the new template mode, you can add the following line of code to your child theme’s functions.php file.
remove_theme_support( 'block-templates' );
Creating A New Custom Template
To create your first block template, click on the “New” link underneath the dropdown list in the Template settings area.
You will be asked to give the template a name.
Hit the create button and you will be transferred to the block template editor window or “template mode”.
The interface is shockingly bad but not unexpected for an early release.
A new template will add a block group containing the Site Title and Site Tagline blocks, followed by a Separator block and then any blocks that you had added to the original post.
In the example above, I had already added two Header blocks and a Paragraph block.
Unfortunately, you still can’t edit the header and footer of the site in template mode, so you could ask yourself what use is it just now?
Highly converting landing pages remove the header, footer and other distracting elements so this blank canvas template mode would be an ideal way to create your site’s landing pages.
In Template Editing Mode, you can build your templates using all the available blocks, including FSE blocks like Site Title, Site Tagline, Login/out, Query Loop, and many more.
Here are the design blocks available in WordPress 5.8.
Here are the theme blocks available in WordPress 5.8.
You also have a few useful WooCommerce blocks available; this is not the complete list of WooCommece blocks.
Save & Use Your New Template
Once you have completed your template design, click on the Update button and then return back to the post editor using the “Back” link in the top left corner of the template mode editor.
Once back in the post editor, choose the template you want from the template dropdown list in the settings sidebar, update the post, then click on the preview button to view it.
Templates are stored in your WordPress database as custom post types named wp_template.
Not only does this allow you to edit a template from the editor interface, but it also makes it easy to import or export them.
However, to export these Templates and Templates parts, you must install the Gutenberg plugin.
I assume that eventually this feature will be included in the WordPress core.
WordPress FSE Template Mode Summary
The new FSE template mode introduced in WordPress 5.8 allows you to use the block editor to create post and page themes.
The interface is still very buggy and ugly, so expect it to change in subsequent WordPress versions.
The current template features are limited and you can’t add or edit headers or footers, however, the blank canvas is ideal for experimenting with landing and sales pages.
Tell me your thoughts on this new block template editor.
Join me every Thursday at 1 pm Sydney time for some more WPQuickies – WordPress tips and tricks in thirty minutes or less.
Suggest a #WPQuickies Topic
If you have a WordPress topic you’d like to see explained in 30 mins or under, fill out the form below.