Style variations
In the past, a concept known as child themes was often used for simple styling variations of themes. Now, there is the option to have multiple styles in one theme using something called theme.json
and having a base file, with others within a folder.
Note
The theme.json
file is not something we are going to dive deeply into within this book, as we aren’t exploring code. However, you can learn a lot more at https://developer.wordpress.org/themes/global-settings-and-styles/. In simple terms, it’s a recipe file that has all the settings for the theme.
Let’s take a look at how a default theme, for example, Twenty Twenty-Four, uses style variations.
As we discovered before, when we opened the Site Editor, the default Style was selected. Let’s now click Onyx to see what that does.
Figure 14.13 – Style variations showing in Editor
As you should see, it changes the view to that theme. You can select...