-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try adding support for child themes in FSE/GS #27305
Conversation
Size Change: 0 B Total Size: 1.2 MB ℹ️ View Unchanged
|
The intention is to load either - templates for the active theme - OR templates for the parent theme if the active doesn't have it
How important do you think the parent/child theme paradigm will be in Block Themes? Our experience so far is that Block Themes are fairly lightweight. |
That's a good question. I do believe that some of the use cases for child themes are absorbed by the site editor and the user's ability to customize the structure (edit templates) as well as the styles. For sites with a single user, FSE could be enough. Then, there are other use cases that aren't fully covered with the existing FSE:
|
Similar to @nosolosw, I do believe child themes will still be part of the block themes paradigm. I imagine a base theme having complex CSS to implement a very custom design, and then some child themes may exist that simply customize the base design for different verticals e.g: apply minor changes using theme.json, and maybe change a template part like the header. Child themes are also a manifestation of the "Open Source way of doing the things", I may have some changes I require to a theme, most of the theme is ok for my use case by I need to change a specific part. I can change that part using the block editor and then I think other people may like my change and I publish a child theme with only the parts I changed. Users of my child theme still benefit from updates to the base theme. I think in the future (not very close one) if we want we may even have a feature that would allow publishing my modifications to a theme directly as a child theme to the theme repository. |
array( | ||
'taxonomy' => 'wp_theme', | ||
'field' => 'slug', | ||
'terms' => wp_get_theme()->get_stylesheet(), | ||
), | ||
array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending on how complex this PR gets it may make sense to split into two PR's: One that adds child theme support for FSE and another that adds it to Global Styles.
Going to post this one for now. I've seen there's rapid movement in the FSE/templates area and I believe when that's more settle I can resume this work. |
I don't know when can I get back to work on this, so I'm closing it for the time being. |
WORK IN PROGRESS
Fixes #25612
This PR enables the site editor and global styles to work with child themes of block-based themes.
Places that were updated: