Forums › Forums › Search & Filter Pro › Autosubmit on initial load (no infinite scroll)
Tagged: autosubmit infinte-scroll
- This topic has 23 replies, 3 voices, and was last updated 3 years, 9 months ago by Ross.
-
Anonymous(Private) January 26, 2021 at 10:39 am #274038
Hi There,
I have a problem with the auto-submit.
Just because of usability I want to get rid of the submit button. I have auto-submit enabled, but when you visit the page initially it only shows 3 entries and no infinite scroll. When you click in the search field and press enter it works.
https://quo-vademus.org/regions/
I had a workaround in place where I trigger a hidden submit button, but with the new caching plugin it forces an infinite reload of the page.
Thank you.
Trevor(Private) January 26, 2021 at 4:54 pm #274060In 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, I assume that you first followed 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
Using ftp (or some file manager), rename the current results.php template file and bring over a copy of the infinite scroll default results file and rename that to results.php. It will not look so good, but it will take things back to basics to see where the issue/problem lies.
If the correct number of posts now show, and infinite scroll works, then you will know that there is an error in your custom results.php code, so I would then need to asee a copy of that file.
-
AuthorPosts