7 Comments

  1. Eric Karkovack
    · Reply

    This seems like a really neat possibility. I can see the use for having various “flavors” of a theme and having the ability to switch back and forth. Specifically, I’m imagining a multisite network where each site could pick between several designs this way. Seems much more efficient.

    The one current hangup I have with theme.json is that I haven’t found many boilerplates for it yet. A generator with a GUI would be wonderful to have (apparently the first one, gutenberg-theme.xyz, is no longer online).

    But JSON is a different animal, and those of us used to CSS would really benefit for an easy way to add/remove/tweak all of the possible features.

    Report

    • Justin Tadlock
      · Reply

      I have already pieced together a build process using merge-jsons-webpack-plugin alongside my Laravel Mix configuration. Basically, I separate theme.json into multiple, smaller JSON files for easier management. Then, any changes get auto-merged into the main file. I should write a tutorial on it sometime on my personal blog.

      Report

    • Justin Tadlock
      · Reply

      Also, yes, multisite is a great example of building child themes. I’ve had several theme users in the past who would do the same thing. They just had a single parent and served up child themes for design variations on the subsites. This meant just having one source (the parent) to keep updated.

      Report

  2. Gan
    · Reply

    Hi Justin,
    While navigating experimental block themes, I too have been wondering about creating child themes, for a while. Your post was very helpful.

    I added the required style.css file and plugged in the appropriate header >fields.

    Could you kindly elaborate more on “appropriate header fields”. I thought we need to copy block-template-parts and block-templates folders.

    Report

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: