Forums › Forums › Search & Filter Pro › Ajax scroll set to 15, now displays all posts
- This topic has 3 replies, 3 voices, and was last updated 3 years, 10 months ago by Trevor.
-
Anonymous(Private) January 5, 2021 at 9:13 am #271646
So i made the result to only show 15 posts, it use to work with no problems but now it seems to show 15 at a time wrapped in the outer class, if i switch back to pagination it works how it use to.
i.e
<div class=”wrapper”>
//all my posts (first 15)
</div>now for some reason it goes
<div class=”wrapper”>
//all my posts (first 15)
</div>
<div class=”wrapper”>
//all my posts (first 15)
</div>
<div class=”wrapper”>
//all my posts (first 15)
</div>
<div class=”wrapper”>
//all my posts (first 15)
</div>4 times
Trevor(Private) January 8, 2021 at 3:17 pm #272150In the Search & Filter plugin folder, in the subfolder named templates, are two files. Normal pagination template is
results.php
, and there is another for infinite scroll, with a similar but different structure.Which one did you use?
Whichever one you used, you need to first follow our guide when doing that:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
The file must be renamed to either results.php or {the number of the form ID}.php
What you should have done (and maybe did not) is to copy the
results-infinite-scroll.php
template file to your child themesearch-filter
folder, and then rename that copied file toresults.php
Then you would edit that file, making sure to keep the general structure and some of the classes intact. The key classes in that file are:
search-filter-results-list
search-filter-result-item -
AuthorPosts