Created
June 28, 2012 05:17
-
-
Save christophercochran/3009256 to your computer and use it in GitHub Desktop.
Conditionally force content sidebar layout for single posts. (For the Genesis Framework)
This file contains hidden or 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
/** | |
* Conditionally force content-sidebar layout for single posts. | |
*/ | |
function cc_layout_logic() { | |
/** | |
* Genesis layout helper functions. | |
* __genesis_return_content_sidebar | |
* __genesis_return_sidebar_content | |
* __genesis_return_content_sidebar_sidebar | |
* __genesis_return_sidebar_sidebar_content | |
* __genesis_return_sidebar_content_sidebar | |
* __genesis_return_full_width_content | |
*/ | |
if ( is_single() ) | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar'); | |
} | |
add_action( 'get_header', 'cc_layout_logic'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment