Homepage › Community Forums › Adapt Theme Support › Prevent default loop (home page) › Reply To: Prevent default loop (home page)
Ok, just got it figured out. I tried logging in but it didn’t give me access to any of the WP files.
Here’s what I noticed in the default home.php of the theme…..If you look near the top you’ll see this –
<?php
add_action( 'genesis_meta', 'adapt_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
function adapt_home_genesis_meta() {
if ( is_active_sidebar( 'slider-wide' ) || is_active_sidebar( 'slider' ) || is_active_sidebar( 'welcome' ) || is_active_sidebar( 'home-feature-1' ) || is_active_sidebar( 'home-feature-2' ) || is_active_sidebar( 'home-feature-3' ) || is_active_sidebar( 'home-feature-4' ) ) {
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_top' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_welcome' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_middle' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_middlewide' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_feature' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_bottom' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_bottom_message' );
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
}
}
All of the content right under the line – function adapt_home_genesis_meta() { is supposed to look like this instead –
<?php
add_action( 'genesis_meta', 'adapt_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
function adapt_home_genesis_meta() {
if ( is_active_sidebar( 'slider-wide' ) || is_active_sidebar( 'slider' ) || is_active_sidebar( 'welcome-wide' ) || is_active_sidebar( 'welcome-feature-1' ) || is_active_sidebar( 'welcome-feature-2' ) || is_active_sidebar( 'welcome-feature-3' ) || is_active_sidebar( 'home-middle-1' ) || is_active_sidebar( 'home-middle-2' ) || is_active_sidebar( 'home-middle-wide' ) || is_active_sidebar( 'home-feature-1' ) || is_active_sidebar( 'home-feature-2' ) || is_active_sidebar( 'home-feature-3' ) || is_active_sidebar( 'home-feature-4' ) || is_active_sidebar( 'home-bottom-sidebar-1' ) || is_active_sidebar( 'home-bottom-sidebar-2' ) || is_active_sidebar( 'home-bottom-message' ) ) {
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_top' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_welcome' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_middle' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_middlewide' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_feature' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_bottom' );
add_action( 'genesis_after_header', 'adapt_home_loop_helper_bottom_message' );
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
}
}
There are missing widgets up top so that was why that was happening. The above code should fix it. I could have added in your WP editor, but I didn’t want to risk the site going down if there was an error (which is why I asked about the FTP)…..But it should work as I’ve tested it on a local install I have setup. I’ll also make sure to get this updated in the theme, so thanks for letting me know!
