'main', 'render' => 'arcegator_infinite_scroll_render', 'footer' => 'page', 'footer_widgets' => array( 'sidebar-2', 'sidebar-3', ), ) ); //Add theme support for Featured Content. add_theme_support( 'featured-content', array( 'filter' => 'arcegator_get_featured_posts', 'description' => esc_html__( 'The featured content section displays on the index page bellow the header.', 'arcegator' ), 'max_posts' => 6, 'post_types' => array( 'post', 'page' ), ) ); // Add theme support for Responsive Videos. add_theme_support( 'jetpack-responsive-videos' ); // Add theme support for Social Menu. add_theme_support( 'jetpack-social-menu' ); // Add theme support for Testimonials. add_theme_support( 'jetpack-testimonial' ); } add_action( 'after_setup_theme', 'arcegator_jetpack_setup' ); /** * Featured Posts. */ function arcegator_has_multiple_featured_posts() { $featured_posts = apply_filters( 'arcegator_get_featured_posts', array() ); if ( is_array( $featured_posts ) && 1 < count( $featured_posts ) ) { return true; } return false; } function arcegator_get_featured_posts() { return apply_filters( 'arcegator_get_featured_posts', false ); } /** * Custom function to check for a post thumbnail; * If Jetpack is not available, fall back to has_post_thumbnail() */ function arcegator_has_post_thumbnail( $post = null ) { if ( function_exists( 'jetpack_has_featured_image' ) ) { return jetpack_has_featured_image( $post ); } else { return has_post_thumbnail( $post ); } } /** * Custom function to get the URL of a post thumbnail; * If Jetpack is not available, fall back to wp_get_attachment_image_src() */ function arcegator_get_attachment_image_src( $post_id, $post_thumbnail_id, $size ) { if ( function_exists( 'jetpack_featured_images_fallback_get_image_src' ) ) { return jetpack_featured_images_fallback_get_image_src( $post_id, $post_thumbnail_id, $size ); } else { $attachment = wp_get_attachment_image_src( $post_thumbnail_id, $size ); // Attachment array $url = $attachment[0]; // Attachment URL return $url; } }