Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Conditionally force layouts
*
* @since 1.0.0
* @param string $layout
* @return string
*/
function ja_force_layout( $layout ) {
if ( is_home() || is_archive() || is_singular( 'post' ) ) {
$layout = 'content-sidebar';
}
return $layout;
}
add_filter( 'genesis_pre_get_option_site_layout', 'ja_force_layout' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment