Jet pack install not working quite to perfection
-
My theme is a child theme of Twenty Thirteen. I have installed the newest Jetpack WordPress plugin and I am trying to implement infinite scroll on click. I am trying to use a custom page called loop.php to control the way the posts load on the page. It works fine until I hit the “Older posts” button. What happens is it defaults to the content.php to load more posts. Here is a link to the page I am trying to get this to work on: https://www.justawebbie.com
I am not sure what code you will need to see but here is the infinite scroll code:
function twenty_thirteen_infinite_scroll_init() { add_theme_support( 'infinite-scroll', array( 'container' => 'content', 'type' => 'click', 'wrapper' => true, 'render' => 'twenty_thirteen_infinite_scroll_render', 'footer_widgets' => array( 'main', ), 'footer' => 'wrapper', ) ); } add_action( 'after_setup_theme', 'twenty_thirteen_infinite_scroll_init' ); function twenty_thirteen_infinite_scroll_render() { get_template_part( 'loop' ); }
Here is the front page loop:
<div id="content" class="site-content" role="main"> <?php if ( have_posts() ) : ?> <?php /* The loop */ ?> <?php while ( have_posts() ) : the_post(); get_template_part( 'loop' ); endwhile; ?> <?php else : ?> <p class="no-posts"><?php _e('Sorry, no posts matched your criteria', 'example'); ?></p> <?php endif; ?> </div><!-- #content -->
Here is my loop.php:
<article id="post-<?php the_ID(); ?>"> <div class="entry-content"> <div class="showdiv"> <div class="fea-image"><?php the_post_thumbnail( array (150,100) );?></div> <div id="fea-title"><a href="<?php the_permalink() ?>" title="<?php the_title() ?>" rel="bookmark"><?php the_title() ;?></a></div> <div id="fea-date"><?php twentythirteen_entry_date(); ?></div> <div id="showonhover"><?php the_excerpt(); ?></div> </div> </div> </article>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Jet pack install not working quite to perfection’ is closed to new replies.