An introduction to developing WordPress themes

Create Block Theme plugin

Welcome to this lesson on the Create Block Theme plugin for WordPress.

With this lesson, you will:

  • Describe what the Create Block theme plugin is, and why you might use it, and
  • Identify the main features of the plugin and describe their functionality.

Create Block Theme Plugin Options

The Create Block Theme plugin has been developed by the MakeWordPress.org community. An important aspect of this plugin before you get started is to note that it is meant for development only and is not intended for use on a production website.

It’s rather a tool meant for creating new themes.

After you have installed and activated the Create Block Theme plugin, you can then navigate to Appearance > Create Block Theme.

The first four options you will find are all related to the currently activated theme.

  • Export your theme as a zipped file.
  • Create a child theme of your parent theme.
  • Clone it.
  • Overwrite your current theme.

I’m going to describe this option in greater detail later in this lesson.

For the next option, we have Create Blank Theme that’s available to you in case you’re wanting to start off with a boilerplate or an empty theme.

And finally, the last option is Create a Style Variation. This is something that is in relation to global styles and we will be covering this in much greater detail later on within the Intermediate Theme Developer Learning Pathway.

Note that this plugin also helps you with managing your theme fonts. If you go into this UI here, you’ll see all of the currently embedded fonts within your theme. And you’ll note that you have numerous preview options available.

Exporting Changes to Theme Files

One of the best features I’ve discovered using the Create Block Theme plugin is the ability to save changes directly to my theme files.

If I were to make a change to the index template, for example, such as adding a paragraph block, and then if I hit Save, this change is saved in the database.

If I were to now make a change within global styles, such as adding a new color, for example, to the custom palette, so I can search for a color or I could enter the hex code and then I can name my color. I’ll name this one purple. And then you would hit Done. If I were to hit Save, this change as well would be saved to the database.

If we were to navigate now to manage all templates, we would see beside the index template, we’ve got the customized notation. And this means user customizations are taking precedence.

Now, if I were to go back to the site editor, we see the Create Block Theme plugin sidebar and the Save Changes option. This removes the changes from the database and pushes them to the theme files. If we were to navigate back to manage all templates, we will note that the customized notation has been removed.

Now we’ll take a quick look in the theme files to see those saved changes. Within the index template, we can see the paragraph block that was added. And now let’s open the theme.json file so we can search for the new purple color. You can see it there within settings as a new color available for the end user to use.

Do you want to learn more about developing WordPress themes? Check out the Intermediate Theme Developer learning pathway.

This is a preview lesson

Register or sign in to take this lesson.

Suggestions

Found a typo, grammar error or outdated screenshot? Contact us.