Adding remove_theme_support( 'block-templates' )
for site with existing user created template causes error #63822
Open
Description
opened on Jul 22, 2024
Description
Removing theme support for block templates on a site that has a pre-existing template added by a user results in a white screen error on the front end.
Step-by-step reproduction instructions
-
Add a new template (either from "Create new template" command in the Page Editor or in the Site Editor > Templates > "Add New Template")
-
In twentytwentyfour/functions.php add the following lines from curating the editor experience documentation:
function example_theme_support() {
remove_theme_support( 'block-templates' );
}
add_action( 'after_setup_theme', 'example_theme_support' );
- Reload the website home page and see a white screen.
Screenshots, screen recording, code snippet
No response
Environment info
WP 6.6
no Gutenberg plugin
Twenty Twentyfour theme
Chrome
Mac
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Activity