COPY CODE
<?php
add_theme_support( 'infinite-scroll', array(
'type' => 'scroll',
'footer_widgets' => true,
'container' => 'content',
'wrapper' => true,
'render' => 'kleo_render_infinite_scroll',
'posts_per_page' => false
) );
function kleo_render_infinite_scroll() {
while ( have_posts() ) : the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
?>
<?php
if ( $blog_type != 'standard' ) :
get_template_part( 'page-parts/post-content-' . $blog_type );
else:
get_template_part( 'content', get_post_format() );
endif;
endwhile;
} ?>