Forums › Forums › Search & Filter Pro › Results displayed in grid format for Avada
- This topic has 28 replies, 3 voices, and was last updated 7 years, 7 months ago by
Anonymous.
-
Trevor(Private) March 6, 2018 at 10:06 am #164110
Hi Josh
S&F Pro works with Avada. The problem is to get Ajax working with it. Theme Fusion have, so far, not provided the necessary code required to re-trigger Masonry (used in their Grid).
The process is to build a page in the page builder in Avada, placing our search form using a shortcode in a code element, let us assume that the shortcode for your form is this:
[searchandfilter id="1428"]… and the Avada grid where you need it.
Directly above the grid element, add another code element (if the S&F form is already in a code element in that place, you can add these extra two snippets in that same element, under the form).
Then the two new snippets to use are these:
[searchandfilter id="1428" action="filter_next_query"]and:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); // load your Masonry trigger code here }); }(jQuery));</script>The issue is (I have tried to guess what the code is, but so far haven’t figured it) what is need to replace this commented line?
// load your Masonry trigger code hereThen, in the Search & Filter form, the Display Results method needs to be set to
Customand the Results URL to the full URL of the results page.With Ajax switched on (which is the part that does not work as of yet due to that missing code), the Ajax Container will also need to be set.
The last user to ask this question of Theme Fusion is from this thread:
Hopefully, Theme Fusion will provide an answer at some point. As I said, with Ajax OFF, it should work, with the page reloading.
Anonymous(Private) March 6, 2018 at 7:49 pm #164330For Avada folk, it looks like a “grid” can be achieved by selecting the Recent Posts element within a container in the Fusion Builder. There’ll have to be some extra CSS to style the results boxes the way you like, and you’ll need to set “results per page” inside the S&F settings instead of the Recent Posts element dialogue. Hope this helps others.
-
AuthorPosts