Missing Header and Footer for Plugin Views

Hello,
I’m currently creating a theme with Sage 9.0.10 & Bootstrap preset on Wordpress 5.6 and ran into an issue with plugins:
All plugins using get_header() or get_footer() (e.g. Tribe’s Event Calendar) can’t load the required Blade templates in their default view because header.php and footer.php are missing.

I’m new to sage and understand that they are missing on purpose but isn’t there some code in filters.php that hooks at least the get_header function?
Anyway, what would be the best way to fix this issue by default instead of creating custom templates for each plugin?

I managed to get it working by adding header.php and footer.php similar to the Multisite Support fix.
It’s basically a fallback wrapper when blade templates are not available.
I’m gonna leave the code here for reference:

resources/header.php

<!doctype html>
<html <?php language_attributes(); ?>>
    <?= \App\template('partials/head'); ?>
    <body <?php body_class(); ?>>
        <?php do_action('get_header'); ?>
        <?= \App\template('partials/header'); ?>
        <div class="wrap container" role="document">

resources/footer.php

        </div>
        <?php do_action('get_footer');
        echo \App\template('partials/footer');
        wp_footer(); ?>
    </body>
</html>

Could this be mentioned in the Compatibility Docs?

This topic was automatically closed after 42 days. New replies are no longer allowed.