Skip to content

Instantly share code, notes, and snippets.

@jaredatch
Created February 27, 2014 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaredatch/9259919 to your computer and use it in GitHub Desktop.
Save jaredatch/9259919 to your computer and use it in GitHub Desktop.
<?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