false, 'container' => 'main', 'render' => 'fortress_infinite_scroll_render', 'footer' => 'page', 'footer_widgets' => array( 'sidebar-2', 'sidebar-3', 'sidebar-4', 'sidebar-5', 'sidebar-6' ), ) ); // Add theme support for Featured content. add_theme_support( 'featured-content' , array( 'featured_content_filter' => 'fortress_get_featured_posts', 'max_posts' => 4, 'post_types' => array( 'post' ), ) ); // Add theme support for Responsive Videos. add_theme_support( 'jetpack-responsive-videos' ); // Add theme support for Social Menus. add_theme_support( 'jetpack-social-menu' ); } add_action( 'after_setup_theme', 'fortress_jetpack_setup' ); /** * Change the wrapper id. */ function fortress_infinite_scroll_js_settings( $settings ) { $settings['id'] = 'posts-grid'; return $settings; } add_filter( 'infinite_scroll_js_settings', 'fortress_infinite_scroll_js_settings' ); /** * Custom render function for Infinite Scroll. */ function fortress_infinite_scroll_render() { while ( have_posts() ) { the_post(); if ( is_search() ) : get_template_part( 'components/post/content', 'search' ); else : get_template_part( 'components/post/content', 'grid' ); endif; } } /** * Getter function for Featured Content. * See http://jetpack.me/support/featured-content/ */ function fortress_get_featured_posts() { return apply_filters( 'fortress_get_featured_posts', array() ); } /** * Check for minimum number of featured posts */ function fortress_has_featured_posts( $minimum = 1 ) { $minimum = absint( $minimum ); $featured_posts = apply_filters( 'fortress_get_featured_posts', array() ); if ( ! is_array( $featured_posts ) ) { return false; } if ( $minimum > count( $featured_posts ) ) { return false; } return true; } function fortress_social_menu() { if ( ! function_exists( 'jetpack_social_menu' ) ) { return; } else { jetpack_social_menu(); } }