WordPress / create-block-theme

A WordPress plugin to create block themes
https://wordpress.org/plugins/create-block-theme/
GNU General Public License v2.0
323 stars 51 forks source link
blocks gutenberg theme tools wordpress wordpress-plugin wordpress-theme

Create Block Theme

Welcome to Create Block Theme - a WordPress plugin to create block themes from within the Editor.

It works alongside features that are already available in the Editor to enhance the workflow for creating block themes. After being tested in this plugin, some of the features included here may be moved into the Editor itself.

[!IMPORTANT] Disclaimer: The Create Block Theme plugin offers critical developer-friendly features; you can think of it as a Development Mode for WordPress, and you should keep in mind that changes made through this plugin could change your site and/or theme permanently.

(Make sure you know what you're doing before hitting that 'Save' button 😉)

This plugin allows you to:

This plugin also makes several changes to the contents of an exported theme, including:

Learn more about Create Block Theme:

User Support

If you have run into an issue, you should check the Support Forums first. The forums are a great place to get help. If you have a bug to report, please submit it to this repository as an issue. Please search prior to creating a new bug to confirm its not a duplicate.

Plugin Features

Theme Creation Options

There are six options the plugin provides to create a new theme:

1. Export

Export the activated theme including the user's changes.

2. Create a child theme

Creates a new child theme with the currently active theme as a parent.

3. Clone the active theme

Creates a new theme by cloning the activated theme. The resulting theme will have all of the assets of the activated theme combined with the user's changes.

4. Overwrite theme files

Saves the user's changes to the theme files and deletes the user's changes from the site.

5. Generate blank theme

Generate a boilerplate "empty" theme inside of the current site's themes directory.

6. Create a style variation

Saves user's changes as a style variation of the currently active theme.

Embed Fonts

Save fonts in your theme that have been installed with the Font Library (found in WordPress 6.5+, more information).

How to Use the Plugin

Step 1: Setup

To use the latest release of the Create Block Theme plugin on your WordPress site: install from the plugins page in wp-admin, or download from the WordPress.org plugins repository.

There will be a new panel accessible from the WordPress Editor, which you can open by clicking on a new icon to the right of the "Save" button, at the top of the Editor.

In the WordPress Admin Dashboard, under Appearance there will also be a new page called "Create Block Theme".

Step 2: Styles and templates customizations

Make changes to your site styles, fonts and templates using the Editor.

Step 3: Save

Still in the WordPress Editor, navigate to the Create Block Theme menu at the top of the Editor.

To save recent changes made in the Editor to the currently active theme or export the theme:

To export your theme to a zip file ready to import into another system:

To edit the theme metadata:

To create a new blank theme:

The theme will be created and activated.

To create a variation:

A new variation will be created.

To create a new Clone of the current theme or to create a Child of the current theme:

To inspect the active theme's theme.json contents:

Many of these options are also available under the older, deprecated Create Block Theme page under Appearance > Create Block Theme.

To install and uninstall fonts:

How to Contribute

We welcome contributions in all forms, including code, design, documentation, and triage. Please see our Contributing Guidelines for more information.