'content', 'footer_widgets' => 'something_fishy_has_footer_widgets', ) ); } add_action( 'after_setup_theme', 'something_fishy_jetpack_setup' ); /** * something_fishy_has_footer_widgets() checks whether or not footer widgets are present. If they are present, then a button to * 'Load more posts' will be displayed and IS will not be triggered unless a user manually clicks on that button. * * Something Fishy has a right sidebar that drops underneath the content in mobile view, as well as three footer widget areas we need to check. */ function something_fishy_has_footer_widgets() { if ( jetpack_is_mobile( '', true ) && is_active_sidebar( 'sidebar-1' ) || is_active_sidebar( 'footer-sidebar-1' ) || is_active_sidebar( 'footer-sidebar-2' ) || is_active_sidebar( 'footer-sidebar-3' ) ) return true; return false; }