Forums › Forums › Search & Filter Pro › Issues with results and sorting
Tagged: No results, search product tags, sort order
- This topic has 27 replies, 2 voices, and was last updated 5 years, 2 months ago by Trevor.
-
Trevor(Private) October 9, 2019 at 9:02 am #223251
I see a number of things. First is that you have two forms based on the WooCommerce store. They are likely to interfere with each other. Try changing one to ‘Custom’ and give it a Results URL to go to (and switch off Ajax on that form).
The other is the way Infinite Scroll needs to work (using selectors) and the lack of a suitable selector for the Infinite Scroll Container in your template HTML. The Post / Result Selector should be set to
.product
I would need to see the PHP template for the page to be able to advise where to add HTML to satisfy the need for an Infinite Scroll Container.
However, if you edit that file (always do this in a child theme), look for a structure like this (there will be other stuff in your template file, but these are the key lines):
<div class='name_of_ajax_container_class' if ( $query->have_posts() ) { ?> <div class='name_of_infinite_scroll_container_class'> <?php while ($query->have_posts()) { $query->the_post(); ?> <div class='name_of_infinite_scroll_post_selector_class'> // post output here </div> <?php } ?> </div> <?php } else { ?> <div class='name_of_infinite_scroll_container_class' data-search-filter-action='infinite-scroll-end'> <span>End of Results</span> </div> <?php } </div>
Yours is missing this part:
<div class='name_of_infinite_scroll_container_class'>
and the closing</div>
-
AuthorPosts