• Resolved bigant841

    (@bigant841)


    I am having a very strange issue when I integrated the infinite scroll from jetpack into my theme. Everything is working perfect, except when you scroll to reveal more of the posts. What is happening is my posts are getting displayed in my correct div but the it is not displaying my title, date, category, and read more button, all it is doing is repeating the posts content.

    Here is a screen shot
    finalelements.com/1.png

    I have the page set up to only display 4 post (for testing purposes). Under that 4 it is displaying the hidden divs that will be displayed when scrolling. It is displaying the amount of posts I have but it is only displaying the content.

    Here is my function I am using

    function sdfa_infinite_scroll_setup() {
    add_theme_support( ‘infinite-scroll’, array(
    ‘container’ => ‘newsRowPage’,
    ‘footer’ => ‘post’,
    ‘posts_per_page’ => 4,
    ‘wrapper’ => false,
    ) );
    }
    add_action( ‘after_setup_theme’, ‘sdfa_infinite_scroll_setup’ );

    Here is my post page

    <div id=”imageWrapper-Project”>

    • <span>SDFA</span>
    • <h3>Labs</h3>

    </div>
    <div id=”newsWrapper”>
    <section id=”newsRowPage”>
    <?php if ( have_posts() ) : ?><?php while ( have_posts() ) : the_post(); ?>
    <?php get_template_part( ‘content-post’, get_post_format() );?>
    <?php endwhile; endif; ?>
    </section>
    </div>
    <?php sdfa_paging_nav(); ?>
    <?php get_footer(); ?>

    Here is my Content Post that displays the divs

    <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>

    </article>

    I can’t seem to figure out the issue that I am having and did not come across anyone else who had this problem. My site is on my local machine so I do not have a link to the site

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Jetpacks infinite scroll is displaying older post with missing page attributes’ is closed to new replies.