Infinite Scroll – Jetpack and custom theme
-
Hello,
I’m looking to create an infinite scroll with Jetpack on a simple list of articles which we have running at the end of all pages of our site.
You can check out the static feed as it is now at the bottom of our homepage: https://www.thesportreview.com/tsr/
This is the WP_Query code we have to load 60 of the most recent posts, which we’d like to implement IS on.
<?php $recent = new WP_Query("showposts=60"); while($recent->have_posts()) : $recent->the_post();?> <li> <a href="<?php the_permalink() ?>" rel="bookmark" title="<? echo get_post_meta($post->ID, 'short_headline', true) ?>" > <div class="news-feed-image" ><img src="<? echo get_post_meta($post->ID, 'leadimage', true) ?>" width="140" height="80" alt="<? echo get_post_meta($post->ID, 'short_headline', true) ?>" style="border:none" /></div></a> <div class="news-feed-item-wrap"><a href="<?php the_permalink() ?>" rel="bookmark" title="<? echo get_post_meta($post->ID, 'short_headline', true) ?>" ><?php the_title(); ?></a> <span class="news-feed-item-sf"><? echo get_post_meta($post->ID, 'standfirst', true) ?></span> <span class="homepage-time-icon"></span><span class="homepage-time"><?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?> </span> <span class="news-feed-sport"><?php the_category(' '); ?></span> <?php if ( get_the_author_id() == '82' ) { ?><span class="promoted-paddy">Promoted by</span><?php } ?> <div style="clear:both"></div></div> </li> <?php endwhile; ?>
We’re using a custom theme and I’ve tried tweaking a few settings but can’t get it to work – any help would be much appreciated!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Infinite Scroll – Jetpack and custom theme’ is closed to new replies.