Jetpack infinite scroll & get template part
-
Hello there!
I am using the jetpack infinite scroll but i have some problem with get template part…
here is how i have enable the infinite scroll:
add_theme_support( 'infinite-scroll', array( 'type' => 'scroll', 'footer_widgets' => false, 'container' => 'main', 'footer' => false, 'wrapper' => false, 'render' => false, 'posts_per_page' => false, ) );
and here is the loop:
<div id="main"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php get_template_part( 'content', 'custom' ); ?> <?php endwhile; ?> <?php endif; ?> </div>
now, the infinite scroll works fine BUT the first 7 posts are from content-custom.php and all the other posts that are loading are from content.php…
I want to load posts only from content-custom.php when i scroll down… How can this be done?
Thank you?
- The topic ‘Jetpack infinite scroll & get template part’ is closed to new replies.