Skip to content

Instantly share code, notes, and snippets.

@authentikHQ
Created October 29, 2018 13:46
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 authentikHQ/edf70afb27d5cb5e4595e09f28ed5191 to your computer and use it in GitHub Desktop.
Save authentikHQ/edf70afb27d5cb5e4595e09f28ed5191 to your computer and use it in GitHub Desktop.
Force a site layout with the Genesis Framework.
<?php
// Do NOT include the opening php tag.
// Force content-sidebar layout.
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
// Force sidebar-content layout.
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_content' );
// Force content-sidebar-sidebar layout.
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar_sidebar' );
// Force sidebar-sidebar-content layout.
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_sidebar_content' );
// Force sidebar-content-sidebar layout.
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_content_sidebar' );
// Force full-width-content layout.
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