Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cre8tivediva/74288da83ff78129f000da0dde327ec1 to your computer and use it in GitHub Desktop.
Save cre8tivediva/74288da83ff78129f000da0dde327ec1 to your computer and use it in GitHub Desktop.
Force content-sidebar layout on blog posts when your default layout is full-width content
//* Force sidebar on blog posts and archives
add_filter( 'genesis_pre_get_option_site_layout', 'nabm_force_layout' );
function nabm_force_layout( $opt ) {
if ( is_single() || is_archive() ) {
$opt = 'content-sidebar';
return $opt;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment