Last active
April 9, 2019 16:41
-
-
Save alexmustin/f76739918ea895a4c5a34c0a0a150074 to your computer and use it in GitHub Desktop.
Genesis - Force Gutenberg Pages to be Full-Width
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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