Forked from christophercochran/Genesis Layout Logic
Last active
December 21, 2015 16:59
-
-
Save wpspeak/6337066 to your computer and use it in GitHub Desktop.
Conditionally force layout in 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
<?php | |
/** | |
* Conditionally force layout in Genesis Framework | |
*/ | |
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_home() || is_archive() ) | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content'); | |
} | |
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