Forums Forums Search & Filter Pro Masonry, infinite scroll and Ajax

Viewing 10 posts - 1 through 10 (of 12 total)
  • Anonymous
    #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
    #237675

    Are 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.

    Anonymous
    #237698
    This reply has been marked as private.
    Trevor
    #237722

    The layout does not look good after the first 6 posts. Is this what you mean? If masonry is OF, is it then OK?

    Anonymous
    #237724
    This reply has been marked as private.
    Trevor
    #237726

    The problem is then that Masonry has to be re-applied on each ‘page’ load.

    How do/did you apply it when the page first loads?

    Anonymous
    #237731
    This reply has been marked as private.
    Trevor
    #237733

    Maybe 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>
    Anonymous
    #237735
    This reply has been marked as private.
    Trevor
    #237777

    I 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

Viewing 10 posts - 1 through 10 (of 12 total)