• rbergeron81

    (@rbergeron81)


    Hi, I would like to buy the premium version of your plugin to take advantage of the “Load More” option, but I just want to make sure I get it working using the free version first.

    I am running into an issue where once you scroll down the page, it loads the next posts, but then if you scroll further, it loads the same posts again.

    http://50.87.248.182/~homecolu/

    Any help on this would be much appreciated.

    The query I am using is below:

    if ( get_query_var('paged') ) {
      $paged = get_query_var('paged');
    } elseif ( get_query_var('page') ) {
      $paged = get_query_var('page');
    } else {
      $paged = 1;
    }
    
    $list_args = array(
      'post_type' => 'property',
      'posts_per_page' => 3,
      'meta_key' => 'open_house_date',
      'orderby' => 'meta_value_num',
      'order' => 'ASC',
      'paged' => $paged,
      'meta_query' => array(
         array(
           'key'     => 'open_house',
           'value'   => 'yes',
           'compare' => '=',
         ),
      )
    );
    $list_query = new WP_Query( $list_args ); ?>
    <?php if ( $list_query->have_posts() ) : ?>
      <div class="open-house-list">
        <?php while ( $list_query->have_posts() ) : $list_query->the_post(); ?>
        <div class="open-house-item">
           <!--post content here-->
        </div>
        <?php endwhile; ?>
    <?php if (  $list_query->max_num_pages > 1 ) : ?>
      <nav id="open-house-pagination">
        <?php next_posts_link('Older »', $list_query->max_num_pages ) ?>
        <?php previous_posts_link( 'Newer posts »', $list_query->max_num_pages);?>
      </nav>
    <?php endif; ?>
    </div>
    <?php wp_reset_query(); ?>
    <?php endif; ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi rbergeron81,
    our support team told me that have already made this customization.

    If you like it, please leave five star review.

    Regards 🙂

    Hi there, I am experiencing the same issue. Once the posts are loaded if I scroll back to the top and then down again, the posts are endlessly repeated…will this be fixed in the free version?
    Thanks,
    Claudia

    Plugin Author YITHEMES

    (@yithemes)

    Hi Claudia,

    the problem isn’t with plugin, but with custom pagination. You need to add a specific class to next posts link and use it in the plugin configuration.

    Regards 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Posts repeat after all posts have been loaded’ is closed to new replies.