Looking for support? You can access the support system via your account.
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, 2 months ago by Ross.
-
Lion Hummer(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 Moderator(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.
Lion Hummer(Private) January 26, 2021 at 5:11 pm #274069Hi Trevor,
I did exactly that and as I said if I search for something it works as expected. Just on the initial load it shows me that there are 45 results but when I scroll down it is not loading more than the initial 3.
Trevor Moderator(Private) January 26, 2021 at 5:15 pm #274072So the default code (the unstyled results list) version works fine and does not have this issue? Is it currently set up like that?
Lion Hummer(Private) January 26, 2021 at 5:16 pm #274074I restored the original again and it still would not work as I expect it to.
Lion Hummer(Private) January 26, 2021 at 5:17 pm #274076No, the default one also doesn’t work. And it never did work. I had a workaround that does not work either anymore.
Trevor Moderator(Private) January 26, 2021 at 6:32 pm #274097This reply has been marked as private.Trevor Moderator(Private) January 27, 2021 at 7:34 am #274186This reply has been marked as private. -
AuthorPosts
You must be logged in to reply to this topic.