Forums › Forums › Search & Filter Pro › “No Results Founds” displaying repeatedly at the end of the results list
- This topic has 12 replies, 2 voices, and was last updated 4 years, 10 months ago by Trevor.
-
Trevor(Private) January 15, 2020 at 11:35 am #231236
I have looked at the file and indeed the structure of the HTMl is that of a non-infinite scroll results.php file.
It will need to be modified/edited to be usuable for infinite scroll.
If you look in the plugin folder, there is a templates sub folder with examples of normal pagination and infinite scroll, to help you re-code it.
For me it might look like this instead?
* @package Search_Filter * @author Ross Morsali * @link https://searchandfilter.com * @copyright 2018 Search & Filter * * Note: these templates are not full page templates, rather * just an encaspulation of the your results loop which should * be inserted in to other pages by using a shortcode - think * of it as a template part * * This template is an absolute base example showing you what * you can do, for more customisation see the WordPress docs * and using template tags - * * http://codex.wordpress.org/Template_Tags * */ if ( $query->have_posts() ) { ?> <!-- *********************************************************************************************************** products ************************************************************************************************************* --> <div class="found">Found <?php echo $query->found_posts; ?> Results<br /></div> <div class="search-filter-results-list products-list-area"> <?php while ($query->have_posts()) { $query->the_post(); ?> <div class="search-filter-result-item products-list-item w_addt_image"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <!-- 1st image from gallery on hover --> <?php $addt_image = get_field('nr_additional_images'); if( $addt_image ): ?> <div class="products-list-item-img-wrap addt_image"> <img src="<?php echo $addt_image[0]["sizes"]["large"]; ?>"> </div> <?php else: ?> <div class="products-list-item-img-wrap addt_image"> <?php the_post_thumbnail(); ?> </div> <?php endif; ?> <?php $product_thumb = get_the_post_thumbnail(''); if( !empty($product_thumb) ): ?> <div class="products-list-item-img-wrap"> <?php the_post_thumbnail(); ?> </div> <?php else: ?> <div class="products-list-item-img-wrap"> <img src="http://placehold.it/300x300/e5e5e5/ffffff?text=Image+Not+Available" alt=""> </div> <?php endif; ?> </a> <div class="details"> <!-- <div class="product-material-and-collection"><?php the_field('nr_material'); ?> | <?php the_field('nr_collection'); ?></div> --> <div class="product-material-and-collection"> <?php $field1 = get_field_object('nr_material'); $materials = get_field('nr_material'); // array of selected values $resultstr = array(); foreach ($materials as $material) { $resultstr[] = $field1['choices'][ $material ]; } echo implode(", ",$resultstr); ?> | <?php $field = get_field_object('nr_collection'); $value = $field['value']; $label = $field['choices'][ $value ]; ?> <?php echo $label; ?> <?php the_favorites_button($post_id, $site_id); ?> </div> <div class="product-name"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </div> </div> </div> <?php } ?> </div> <?php } else { ?> <div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'> <span>End of Results</span> </div> <?php } ?>
-
AuthorPosts