Skip to content

Instantly share code, notes, and snippets.

@anythinggraphic
Last active January 29, 2017 03:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anythinggraphic/ac70e27f0237073dbea5 to your computer and use it in GitHub Desktop.
Save anythinggraphic/ac70e27f0237073dbea5 to your computer and use it in GitHub Desktop.
Conditionally force full-width layout
<?php
/* Force full width conditionally
----------------------------------------------------------------------------------------*/
add_action( 'genesis_meta', 'bw_force_layout' );
function bw_force_layout() {
if ( is_front_page() ) {
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment