Skip to content

Instantly share code, notes, and snippets.

@digamber89
Created August 10, 2021 16:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digamber89/8bb3e825907134469fe3c5a26ac81b7a to your computer and use it in GitHub Desktop.
Save digamber89/8bb3e825907134469fe3c5a26ac81b7a to your computer and use it in GitHub Desktop.
Single Book - PHP Template for FSE THEME
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>"/>
<?php
wp_head();
$tree = WP_Theme_JSON_Resolver_Gutenberg::get_merged_data( array(), 'theme' );
$default_layout = _wp_array_get( $tree->get_settings(), array( 'layout' ) );
$layout_style = gutenberg_get_layout_style( '.custom-wp-blocks-container', $default_layout );
echo '<style>' . $layout_style . '</style>';
?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php gutenberg_block_header_area(); ?>
<main class="custom-wp-blocks-container">
<?php the_content(); ?>
</main>
<?php gutenberg_block_footer_area(); ?>
<?php wp_footer(); ?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment