Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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