Forum Replies Created
-
Author
-
fanartixParticipantfanartixParticipantfanartixParticipant
there were 2 wrong things in the code:
1)try to change
type' => 'scroll',
for
type' => 'click',
and place a comma after
'posts_per_page' => false
and take a look at jetpack otions max posts per page. I noticed that if you let as default (10) it does’nt show all page content. So it might be better to uncomment kleo paginatin to avoid problems.
fanartixParticipantCOPY 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; } ?>
fanartixParticipantyou checked the infinite scroll option in jetpack configurations, right? don’t know what else could you be doing wrong. Just checking: the functions you put inside php tags, right? <?php put_functions_here ?>
fanartixParticipantIt looks right… I forgot to mension I commented kleo_pagination(); on index.php. It works here…
fanartixParticipantyou have to put id=”content” inside kleo’s index.php (in a div next to line 104, before the loop) and put this on kleo’s functions.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;
} -
AuthorPosts