Created
February 27, 2014 21:28
-
-
Save jaredatch/9259919 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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