Forums › Forums › Search & Filter Pro › Infinite scroll – duplicated post
Tagged: infinite scroll
- This topic has 36 replies, 3 voices, and was last updated 4 years, 9 months ago by Ross.
-
Anonymous(Private) December 13, 2019 at 12:25 pm #229066
Hello,
I’m using the plugin in ajax and infinte scroll mode. Display method custom.
Displays random duplicates. Other pages appear when refreshing.And plugin display duplicated post:
http://i.epvpimg.com/ReXUbab.jpgSettings:
http://i.epvpimg.com/pEMPbab.pngTPL code:
<?php get_header();?> <div class="container"> <div class="row"> <div class="col-12"> <div class="cars-stock-banner"> <?php $image = get_field('car-stock-photo'); $size = 'full'; // (thumbnail, medium, large, full or custom size) if( $image ) { echo wp_get_attachment_image( $image, $size, '', array( "class" => "lazyload" ) ); } ?> <div class="cars-stock-banner__content text-center"> <?php if (have_posts()): while (have_posts()) : the_post(); ?> <?php the_content();?> <?php endwhile; ?> <?php endif; ?> </div> </div> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-12"> <div class="cars-stock-filters"> <!-- <div class="js-cars-stock-filters-button cars-stock-filters__button"> <?php _e('Filtrowanie (opcjonalnie)', 'cupra');?> </div> --> <div class="cars-stock-filters__form"> <?php echo do_shortcode('[searchandfilter id="464"]');?> </div> </div> </div> </div> <?php $argsCars = array('post_type' => 'post'); $argsCars['search_filter_id'] = 464; $queryCars = new WP_Query($argsCars); ?> <div id="cars-stock-ajax"> <div class="cars-stock-infinite-scroll row"> <?php if ($queryCars->have_posts()): while ($queryCars->have_posts()) : $queryCars->the_post(); ?> <div class="col-12 col-sm-6 cars-stock-infinite-scroll-item"> <div class="row"> <div class="col-11"> <div class="cars-stock-item__img"> <a href="<?php the_permalink();?>"> <div class="cars-stock-item__location"> <span> <?php the_field('location_car');?> </span> </div> <?php $foto = get_field('photo_1') ?> <img src="<?php echo $foto['sizes']['large'] ?>" alt="<?php the_title(); ?>" /> </a> </div> </div> </div> <div class="row"> <div class="col-12 text-right"> <div class="cars-stock-item-info"> <a class="cars-stock-item-info__link" href="<?php the_permalink();?>" title="<?php _e('Zobacz więcej', 'cupra');?>"> <h3> <?php the_field('marka'); ?> <?php the_field('model'); ?> </h3> </a> <p class="cars-stock-item-info__price"> <?php the_field('cena_promocyjna'); ?> </p> <p class="cars-stock-item-info__parameters"> silnik: <?php the_field('pojemnosc_skokowa'); ?> <?php the_field('moc'); ?> </p> <p class="cars-stock-item-info__parameters"> skrzynia: <?php the_field('skrzynia'); ?> </p> <a class="cars-stock-item-info__more" href="<?php the_permalink();?>" title="<?php _e('Zobacz więcej', 'cupra');?>"> <?php _e('Zobacz więcej', 'cupra');?> </a> </div> </div> </div> </div> <?php endwhile; else:?> <span data-search-filter-action='infinite-scroll-end'><?php _e('Brak więcej wyników');?></span> <?php endif; ?> </div> </div> </div> <div class="pagination"> </div> <?php get_footer();?>
Anyone can help me?
Anonymous(Private) December 13, 2019 at 12:39 pm #229069Nope. Look:
http://i.epvpimg.com/KIqvbab.jpg -
AuthorPosts