Last active
December 20, 2015 23:19
-
-
Save StewartChamberlain/6211534 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 // Do Not include this line | |
// Execute custom home page. If no widgets active, then loop | |
add_action( 'genesis_meta', 'sc_custom_home_loop' ); | |
function sc_custom_home_loop() { | |
if ( is_active_sidebar( 'home-featured-full' ) || is_active_sidebar( 'home-featured-left' ) || is_active_sidebar( 'home-featured-right' ) || is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) || is_active_sidebar( 'home-middle-3' ) || is_active_sidebar( 'home-bottom' ) ) { | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
add_action( 'genesis_before_content', 'sc_home_do_featured' ); | |
add_action( 'genesis_before_content', 'sc_home_do_middle' ); | |
add_action( 'genesis_before_content', 'sc_home_do_bottom' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment