Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active August 29, 2015 14:21
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 srikat/87d4774dc5a7c3850d7b to your computer and use it in GitHub Desktop.
Save srikat/87d4774dc5a7c3850d7b to your computer and use it in GitHub Desktop.
Force full width content on 404 pages in Genesis.
add_action( 'get_header', 'sk_set_404_layout' );
/**
* Force full width content on 404 pages
*
* @author Sridhar Katakam
* @link https://sridharkatakam.com/how-to-set-full-width-content-on-404-pages-in-genesis/
*/
function sk_set_404_layout() {
if ( ! is_404() ) {
return;
}
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