Support » Networking WordPress » Multisite and Block Themes (FSE)

  • I’ve looked around the forums and have done a general Google search and neither answered the question of how Multisite and FSE Block Themes interact. What happens if two sites are both using Twenty Twenty-two and the admin on the first site makes some template parts or edits the header? Are those edits and parts restricted to just that site or would they also apply to the second site? I maintain several Multisite instances and have held off telling users about FSE because I’m not sure what might happen if folks start editing.

    • This topic was modified 1 month, 3 weeks ago by James Huff. Reason: moved to Networking WordPress since this is a multisite issue
Viewing 4 replies - 1 through 4 (of 4 total)
  • The handling of themes in multisites is always the same – no matter if blocktheme or not. You can use different themes in all pages of a multisite. Their settings are effective only in the page in which they are used – not in others. However, if you change something in the files of a theme, it will change for all pages where the theme is used.

    Thread Starter Jon Breitenbucher

    (@kahless)

    @threadi “However, if you change something in the files of a theme, it will change for all pages where the theme is used.”

    This is what I am getting at. When you make a new template part it seems to be stored in the theme folder of a FSE theme. If you make edits to a template part in a FSE theme those seem to be stored in the theme files. This is problematic in a Multisite setup since the theme is shared by all users. I was hoping to learn that in a Multisite setup the FSE themes handle things differently to keep edits independent for each site using the FSE theme.

    @kahless

    Multisite + FSE/block themes are fairly incompatible as of yet as referenced here.

    github.com/WordPress/gutenberg/issues/33989
    core.trac.wordpress.org/ticket/55023

    Several plugins are the same in that they look for a header.php and/or footer.php which block themes don’t use. (enable debugging and you may even get an error saying header.php is Deprecated since 3.0)

    That being said, I’ve had mixed results using a block theme on multisite. A few seem to work ok while others give you the white screen of death by simply being activated.

    Found out when converting several blogspot sites into one WP site for someone. They were using a unified, hand coded html, menu for all, plus slightly varied headers to make it look like one blog. They basically created a multisite in a way.

    Multisite + block theme would have been perfect for me but I gave up pretty quick because I was on the clock. He did end up with a block theme so I could create multiple headers for multiple CPT templates and their archives templates, plus the main blog.

    As far as FSE editing, even though the templates and template parts are in the theme folder, your edits go into the DB. That’s how you’re able to “Clear customizations” to those on these pages;

    /wp-admin/site-editor.php?postType=wp_template
    /wp-admin/site-editor.php?postType=wp_template_part

    The ones you’ve customized and can clear the customization of, show a little blue dot. Any template or part that you created from scratch, you can’t clear customizations but can delete it from the db because that’s the only place it exists.

    The feature of being able to make changes to block theme templates & parts and then export it as a distinct theme gives more options, however, you’d have to go through that theme on your local machine and make it it’s own theme. Rename it etc and there’s more to it than simply changing the name in style.css.

    When you do export a changed block theme and then install on a new site, all those templates and parts you created from scratch, are now part of the theme and are in the theme folder. Any subsequent changes you make will be in the db and as per above, can be cleared but not deleted.

    On a side note for FYI, I was only able to create all the CPT templates for that site with the Gutenberg plugin installed and activated. You get a lot more options for what you can create. That thing really bogs down work with my oldish laptop and cheap shared hosting but once I did what I needed, I was able to deactivate Gutenberg and the changes remain.

    IF FSE=beta THEN Gutenberg=alpha

    Sorry about the long winded reply. Just wanted to convey all I’ve learned.

    Gonna go see what I can break now! ;~)

    I figured some things out.

    Two different block themes give white screen of death on subsite if I use the link; Appearance > Editor (beta) in admin menu which is this;

    /wp-admin/site-editor.php

    The above link in wp-admin always adds &postid= the postid of which varies depending on theme.

    There are no links in wp-admin to these site-editor sub pages but I can get to them just fine;

    /wp-admin/site-editor.php?postType=wp_template
    /wp-admin/site-editor.php?postType=wp_template_part

    I can also get to any Template or Template Part from there. That means anything can be done if bypassing the appearance>site-editor link.

    Running the same block theme on both main and subsite, made changes to the Header and Front Page Template on both and as mentioned in my previous post, those changes are done in the DB so one has no affect on the other and either one can be undone.

    Swapped both to a different block theme and got the same results. Tried yet a third block theme and did not get the white screen of death on;

    /wp-admin/site-editor.php

    So, bottom line is, yes you can use a block theme and make changes to one site of a multisite and it doesn’t affect the others BUT, you may get the WSofD.

    I keep these two links handy…

    /wp-admin/site-editor.php?postType=wp_template
    /wp-admin/site-editor.php?postType=wp_template_part

    …plus links to customize, nav-menus, blocks(reusable) and widgets because most block themes hide those even though they still exist and customize especially is useful for the Additional CSS section. Nav-menus can also be handy because it’s quicker to build a menu there and then select it from the block editor, Navigation block.

    Likewise, I have a KB plugin that has it’s own sidebar with widgets, regardless of the theme so I need to be able to get to wp-admin/widgets.

    Any of the above are a lot faster than that main FSE page and none give you WSofD.

    Copy this, add your example.com in front and keep them handy for block themes.

    /wp-admin/site-editor.php?postType=wp_template_part
    /wp-admin/site-editor.php?postType=wp_template
    /wp-admin/edit.php?post_type=wp_block
    /wp-admin/customize.php
    /wp-admin/nav-menus.php
    /wp-admin/widgets.php

    Of course, keep in mind, beta so ymmv and should probably not be used for critical sites.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.