-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
What problem does this address?
Jumping all in on Block Based Themes can be quite difficult & disruptive. Especially on a legacy theme that has loads of customizations that currently are not feasible within a block based theme. There may be new areas of the site though or specific areas of the site where it would be interesting to use the new tools to build just a part of the theme in a block based manner.
Like for example a site that wants to build just the site footer using a block based template part.
What is your proposed solution?
Allow the usage of block based "template parts" without having to also allow block based "templates". In that case the "Editor" (previously Site Editor) would only display the "Template Parts" and not allow the creation of "Templates". And in the themes traditional footer.php file the theme author could render the block template part like so:
echo do_blocks( '
<!-- wp:template-part {"slug":"footer","theme":"fse","tagName":"footer","className":"site-footer","layout":{"inherit":true}} /-->
' );In an ideal case theme authors would also be able to filter whether or not editors should be allowed to manually create their own "template parts" or whether only the ones provided by a theme are available.
Providing this template part first approach to adopting FSE would open the door to many more use cases that currently are not jet ready to jump all with their full content.
Note: This conversation was started in the #fse-outreach-experiment channel in the WordPress Slack