Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nutsandbolts/7352753 to your computer and use it in GitHub Desktop.
Save nutsandbolts/7352753 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