Forums › Forums › Search & Filter Pro › Masonry, infinite scroll and Ajax
- This topic has 11 replies, 2 voices, and was last updated 4 years, 8 months ago by Trevor.
-
Anonymous(Private) March 24, 2020 at 9:49 am #237661
Hello,
I’m using your grat plugin to display results (images) in a masonry grid but with the infinite scroll that doesn’t word. I’m using the shortcode method.
Can you help me and explain me the full method to implement masonry inside your plugin process ?Waiting your feedback, thanks.
Trevor(Private) March 24, 2020 at 10:31 am #237675Are you able to send me a live link/URL to your search page so I can take a look?
In general, instead of using the content and structure of the HTML to be found in the exemplar results.php file, you would use that inside the exemplar results-infinite-scroll.php file, but the template file that your form is using, should still be named results.php, or be numbered the same as the form ID, all as detailed here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
DO use a child theme when you do this.
Trevor(Private) March 24, 2020 at 5:16 pm #237733Maybe add this to the page also then:
<script type="text/javascript"> $(function(){ $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax finish"); $('.search-filter-results').masonry({ itemSelector: '.post', columnWidth: '.post', }); }); }(jQuery)); </script>
Trevor(Private) March 25, 2020 at 11:37 am #237777I am not overly familiar with the masonry coding. We did once figure a way to do it (our developer did), see here (I have gone back through the thread to reveal most of the posts, redacting sections where needed for privacy, anything still private has nothing important in):
https://support.searchandfilter.com/forums/topic/infinite-scroll-with-masonry
-
AuthorPosts