forked from mirror/_s
respect content-search.php for search result in Jetpack Infinite Scroll
This commit is contained in:
parent
7afb7fa42d
commit
a64e3a8092
|
@ -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
|
||||
|
|
Reference in New Issue