Forums › Forums › Search & Filter Pro › Infinite Scroll not working
Tagged: infinite scroll, shortcodes
- This topic has 11 replies, 2 voices, and was last updated 4 years, 9 months ago by Anonymous.
-
Anonymous(Private) February 4, 2020 at 6:34 pm #233051
Hi,
I’ve read through all the other threads on this issue but still can’t get my results pages to display with infinite scroll. I’m using SF Pro with shortcodes and Ajax, BigCommerce, and Elementor. And I’ve made a results.php (with the copied code from results-infinite-php) within a search-filter folder in my theme folder. Also I can’t customize, or affect my results in any way by adding my container classes/HTML tags in the Post/Result selector or Infinite Scroll Container fields. Nothing I have tried has affected my search result output in any way. Here is my results.php code:
<?php
/**
* Search & Filter Pro
*
* Sample Results Template
*
* @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() )
{
?>Found <?php echo $query->found_posts; ?> Results<br />
<div class=’search-filter-results-list’>
<?php
while ($query->have_posts())
{
$query->the_post();?>
<div class=’search-filter-result-item’>
<h2>“><?php the_title(); ?></h2><p><br /><?php the_excerpt(); ?></p>
<?php
if ( has_post_thumbnail() ) {
echo ‘<p>’;
the_post_thumbnail(“small”);
echo ‘</p>’;
}
?>
<p><?php the_category(); ?></p>
<p><?php the_tags(); ?></p>
<p><small><?php the_date(); ?></small></p><hr />
</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
}
?>Thanks
-
AuthorPosts