Forums › Forums › Search & Filter Pro › Results displayed in grid format for Avada
- This topic has 28 replies, 3 voices, and was last updated 6 years, 8 months ago by Anonymous.
-
Anonymous(Private) March 5, 2018 at 6:44 pm #164004
Hi guys,
I’ve sort of browsed the topics in this forum, but haven’t been able to piece an answer together.
I should probably start with this question: Is S&F compatible with Avada? Or does Avada cause so many headaches that it might not be worth using S-F? (note, I love what I see with S-F Pro so far, and this isn’t a slam against you at all).
Ok, so if there are no really difficult issues presented by using Avada, what I’d like to do is have the option to display search results for a group directory in Grid format, which is how we display results for other items like posts.
Is there an easy way to do this for someone who isn’t a code monkey?
Thanks!
Trevor(Private) March 6, 2018 at 10:06 am #164110Hi 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 here
Then, in the Search & Filter form, the Display Results method needs to be set to
Custom
and 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.
-
AuthorPosts