photo credit: Artsy Crafty
Two weeks ago, WordPress theme author Rich Tabor tweeted, “Even with my theme developer hat on, I’m finding it easier and easier to create block themes ~ within ~ WordPress. I’m positive one day (soon) this will be the norm.”
It looks like that day has arrived sooner than expected, as Automattic has had a team working on this capability for awhile. Today, a group of eight full-time sponsored Themes Team contributors released a plugin called Create Block Theme that can create standalone block themes and child themes inside the WordPress admin.
The idea is that users can design their own themes using full-site editing features and then export their finished creation as a theme that can be installed on any other WordPress site. Ben Dwyer shared a video called Designing a theme in the WordPress Editor where designer Beatriz Fialho demonstrated the possibilities. She created a unique new theme using full-site editing features in just a couple of hours.
The plugin offers a variety of exports for different use cases. Users can export their work in the following ways:
- Export the active theme with user changes included
- Export a child theme with the active theme as the parent theme
- Export a clone a new theme based on the active theme with user changes
- Overwrite the theme files to include the user changes as part of the theme
- Export a blank theme into the site’s themes directory
All of these export options are available under Appearance >> Create Block Theme.
“This plugin is aimed at theme builders – both designers and developers,” Dwyer said in the announcement. “It is useful for sharing your designs between multiple sites or users. If you’re just building a site for yourself you probably don’t need it.”
I tested the plugin with the child theme option and it worked as expected. I was able to install it on another site with its unique name and template changes instantly applied. The export screen allows users to give the theme a name, description, and author information, which is saved to the new theme’s style.css file.
“At the moment the UI of this plugin is totally separate from Gutenberg,” Dwyer said. “In time we expect more integration with the Site Editor UI, to make it easier to access these features.
It would be helpful if the theme creation options allowed users to upload a unique screenshot that would be packaged with the theme download. I added this as an issue on the plugin’s GitHub repository, where anyone is welcome to contribute.
The Create Block Theme plugin makes designing and authoring a WordPress theme more approachable than ever before. It has the potential to rapidly increase the number of block themes available, if designers understand how to use it and submit their works to the Themes Directory. The Training Team is currently working on a course for Learn WordPress that will teach people how to create block themes using this plugin.
Create Block Theme was released under the WordPress.org plugins account and can be installed by searching for the plugin’s name in quotes.