Forums Forums Search & Filter Pro My filter result is not scrolling down

Viewing 3 posts - 11 through 13 (of 13 total)
  • Anonymous
    #75523

    Thank you so much sir.

    Ross Moderator
    #75751

    Hi Alaa

    The issue here is that the Javascript that is loaded by your site (as with most websites), is only loaded once, when the page is loaded.

    When S&F loads in new posts with ajax, your websites scripts are not “reloaded” so it doesn’t know how it should behave with the infinite scroll…

    I’m not sure if there would be more issues integrating the two past this point (as you are integrating theme JS with S&F, and its untested) but it looks like for now this is the main issue.

    Just to note, you may have already noticed, but your masonry grid does not work correctly after an ajax request is performed, for the same reason above… when new posts are loaded from S&F, your theme must reload the scripts related to masonry and your infinite scroll..

    Fortunately, we have a JS filter for this (first question): https://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/

    So you need this part for the script:

    //depeding on where you add your JS, sometimes its necessary to wrap the above events in a function (as is standard practise):
    (function ( $ ) {
    	"use strict";
    	
    	$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    		console.log("S&F JS ajax request finished");
    		// ** here you need to reload your masonry & pagination/infinite scroll scripts **
    	});
    }(jQuery));

    The part // ** here you need to reload your masonry & pagination/infinite scroll scripts ** is where you should add this code.

    The next (potentially tricky) part for you is to find out how to do this with your theme, it might be best to open a support ticket with them and refer them to this thread..

    If the above is not possible, then you likely won’t be able to use ajax unless you want to add in normal pagination to your pages.

    Hope that helps

    Anonymous
    #76395

    Thank you so much, it works with me. In addition to your solution, there was an error occur on the betheme js files..
    and here I found the solution..
    Thank you so much dear.

Viewing 3 posts - 11 through 13 (of 13 total)