Forums Forums Search & Filter Pro Search form disappears on search result with infinite scroll

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #244227

    Hello. Since activating infinite scroll on my search results, the search form disappears from the results page after the form is submitted. It does not happen every time, but seems to randomly happen about 80% of the time. You can see it happening here: https://www.crenshawlighting.com/products/.

    If you click the “Refine Search” button, an accordion will drop down with the filter. Select an option and click “Refine Search.” More often than not, the search form will disappear if you open up the accordion again to do another search. You need to reload the page to get the form to show up again.

    These are the troubleshooting steps I’ve tried on my duplicate staging site:

    ~ tried various combinations of Ajax pagination settings in the S&F plugin. Everything works fine with normal pagination. This only happens when infinite scroll is selected.
    ~ deactivated all plugins except Search & Filter, Advanced Custom Fields Pro, and my custom post type plugin. Those last two are needed to display the search results.
    ~ I could not switch to the default WordPress theme because the search form, post type templates, and custom fields are all contained within my custom theme. However I did try removing the search form from the accordion, and I still had the same problem. I also removed all but the most essential functions from the theme’s function file and the problem persisted.

    Do you have any idea on how I can fix this issue so we can use infinite scroll for our search results?

    Thanks for input!

    Trevor
    #244273

    Is the code for the search form also within the Ajax Container?

    Could you let me know what you have in the 3 red sections in your form’s equivalent of this:

    https://www.screencast.com/t/sz6nkSRG

    Anonymous
    #244311

    Hi Trevor, thanks for the quick reply. I see now where my problem lies… the ajax container was still set to #container, and the form was within that. I updated it to include the post grid only, and it’s all working properly now.

    Thanks again!

    Trevor
    #244315

    Thanks for getting back to me. I will close this thread for now.

Viewing 4 posts - 1 through 4 (of 4 total)