Skip to content

Instantly share code, notes, and snippets.

@alexmustin
Last active April 9, 2019 16:41
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 alexmustin/f76739918ea895a4c5a34c0a0a150074 to your computer and use it in GitHub Desktop.
Save alexmustin/f76739918ea895a4c5a34c0a0a150074 to your computer and use it in GitHub Desktop.
Genesis - Force Gutenberg Pages to be Full-Width
<?php
//* Force full-width-content layout for Gutenberg pages
add_filter( 'genesis_site_layout', 'setGutenbergPageLayout' );
function setGutenbergPageLayout(){
if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) ) {
return 'full-width-content';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment