From a64e3a80923b254c83662998224a0b2e7908d200 Mon Sep 17 00:00:00 2001 From: ernilambar Date: Tue, 10 Nov 2015 11:22:39 +0545 Subject: [PATCH] respect content-search.php for search result in Jetpack Infinite Scroll --- inc/jetpack.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/jetpack.php b/inc/jetpack.php index 0d1b5b5a..030b4daf 100644 --- a/inc/jetpack.php +++ b/inc/jetpack.php @@ -32,6 +32,10 @@ add_action( 'after_setup_theme', '_s_jetpack_setup' ); function _s_infinite_scroll_render() { while ( have_posts() ) { the_post(); - get_template_part( 'template-parts/content', get_post_format() ); + if ( is_search() ) : + get_template_part( 'template-parts/content', 'search' ); + else : + get_template_part( 'template-parts/content', get_post_format() ); + endif; } } // end function _s_infinite_scroll_render