Sage 10: Block based theme support?

To get <theme>/block-templates/*.html files to work you can add the following filter which fixes the paths

add_filter('template_include', function ($template_file) {
    global $_wp_current_template_hierarchy;
    $_wp_current_template_hierarchy = array_map('basename', $_wp_current_template_hierarchy);
    return $template_file;
}, 19);
1 Like