fixing jetpack infinite scrolling problems
This commit is contained in:
parent
995bf67d56
commit
c19da9fb4b
|
@ -17,7 +17,7 @@ function understrap_jetpack_setup() {
|
|||
add_theme_support( 'infinite-scroll', array(
|
||||
'container' => 'main',
|
||||
'render' => 'understrap_infinite_scroll_render',
|
||||
'footer' => 'page',
|
||||
'footer' => 'wrapper-footer',
|
||||
) );
|
||||
// Add theme support for Responsive Videos.
|
||||
add_theme_support( 'jetpack-responsive-videos' );
|
||||
|
@ -30,9 +30,10 @@ function understrap_infinite_scroll_render() {
|
|||
while ( have_posts() ) {
|
||||
the_post();
|
||||
if ( is_search() ) :
|
||||
get_template_part( 'template-parts/content', 'search' );
|
||||
get_template_part( 'loop-templates/content', 'search' );
|
||||
else :
|
||||
get_template_part( 'template-parts/content', get_post_format() );
|
||||
get_template_part( 'loop-templates/content', get_post_format() );
|
||||
endif;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue