-
AuthorSearch Results
-
January 6, 2017 at 5:32 am #80443
In reply to: Old Category Reappears
AnonymousInactiveHi Trevor, I’ve just worked around the whole default selection issue. Got it all working now.
Now I just need some assistance in making my search results to show in Masonry.
Using Avada, is it better to display the Masonry results as an Archive Page or Shortcodes?
December 27, 2016 at 10:00 am #78758In reply to: Trouble Updating With Divi Theme
TrevorParticipantHi Greg.
It is a question of figuring out how to re-trigger Masonry. What I do not know is how to do this in Divi, but someone at Divi or on their forums will. It is a question asked quite a few times. The basic javascript required is this:
(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("S&F JS ajax request finished"); // ** here you need to reload your masonry script ** }); }(jQuery));But I do not know what goes in to replace that one line.
December 25, 2016 at 9:24 am #78635In reply to: Old Category Reappears
TrevorParticipantAh, so many questions …
Since this fix was sent to us individually, what happens if there’s a new version of S&F, do I update the plugin then? Will it overwrite the fix that you implemented?
Any fixes done in development versions are rolled into the next (and subsequent) official release, so no worries there.
Should I be worried or cautious for plugin/theme/WP core updates in the future with compatibility with S&F?
Worried? No. As long as you have a current support/updates license, we will continue to support you. any issues that do arise (and inevitably do), do so because the third party theme author/plugin does not follow the protocols laid down in the official WordPress Codex.
Whilst the presence of a theme/plugin on the wordpress.org repositories will tend to indicate that the authors of those plugins/themes have adhered (in the main) to the Codex, many themes and plugins are commercially sold and, as selling is not permitted on wordpress.org, do not always have such a strict adherence to the Codex. This makes our task much harder.
As such, we are in their hands.
Is there a way to show default ticked checkboxes? For example, if on the News page, I just want someone to see a certain category on default when they land on that page?
There are filters that you can use, in S&F Pro, such as the Edit Query Arguments filter. In your child theme functions.php file, you would make a conditional function that checks for the page (name or ID) and checks to see if that field has any settings yet, and if not then you could set it accordingly.
If you search this forum for the key term
sf_edit_query_argsyou may find others that have done this, and code snippets might also be in those threads.As to your follow up post. The authors of Avada have indeed changed it and the FAQ detail about Avada (v4) may not be comparable with v5. There are many threads that discuss using Masonry and how to re-trigger it after Ajax has fired. It should be easy to do, but sometimes is not. Other users have achieved it, but I have not seen this myself.
December 24, 2016 at 4:55 am #78525In reply to: Old Category Reappears
AnonymousInactiveSorry, one more question.
I’ve just made an attempt to test out the results by Archive setting with Avada v5, but haven’t had any success, maybe the theme has changed since the information was posted in FAQ? Anyway, I don’t 100% need the results to show as Archive, but I just want to know how I can add Masonry to the default search-filter.php (which I just edited it a little).
Thank you
December 20, 2016 at 5:44 pm #77876In reply to: Masonry and Search & Filter
AnonymousInactiveI am the theme author. I built this theme from scratch using _s. This page is a standard loop page. Nothing has been modified in that regard, other than removing the excerpt. The only other thing I have done is implement this plugin. I am new to Masonry, but am just trying to make it reinitialize after your plugin does its filtering. If there is any further insight you can give, it would be helpful.
December 20, 2016 at 4:55 pm #77849In reply to: Masonry and Search & Filter
TrevorParticipantMy guess is that it also needs to do more than what I see there. You may need to ask the theme author, “How do I trigger Masonry after an ajax refresh of the loop container?”
December 20, 2016 at 4:47 pm #77844In reply to: Masonry and Search & Filter
AnonymousInactiveYeah, I had already tried that before I tried the one that is in there. I just tried it again for good measure, but no luck. Is there a different masonry function I should be using? Like the hb_masonry(); one you mentioned earlier? I pretty much followed this article to get the Masonry working in the first place.
http://www.wpdevsolutions.com/implement-masonry-in-wordpress/
Should I have implemented it differently?
December 20, 2016 at 3:50 pm #77814In reply to: Masonry and Search & Filter
TrevorParticipantI use the Firefox Web Developer tools and inspect the javascript. (Information -> View Javascript) and then search for
masonry(You had already put this:
(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("S&F JS ajax request finished"); // ** here you need to reload your masonry script ** jQuery(window).load(function() { // MASSONRY Without jquery var container = document.querySelector('#masonry-container'); var msnry = new Masonry( container, { itemSelector: '.search-results-card', columnWidth: '.search-results-card', }); }); }); }(jQuery));And I think it needs to be this:
(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("S&F JS ajax request finished"); var container = document.querySelector('#masonry-container'); var msnry = new Masonry( container, { itemSelector: '.search-results-card', columnWidth: '.search-results-card', }); }); }(jQuery));Maybe.
December 20, 2016 at 12:05 pm #77741In reply to: Masonry and Search & Filter
TrevorParticipantThe first thing you need to know is the function that will initialize Masonry on your site, and whether it is available on the search results page. If you gave me a URL, I could find that for you in a few seconds. Then you would need to add a script to your site. For example, if the function were
hb_masonry()then this might be the script:(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("S&F JS ajax request finished"); hb_masonry(); }); }(jQuery));December 20, 2016 at 12:19 am #77682Topic: Masonry and Search & Filter
in forum Search & Filter Pro
AnonymousInactiveI stumbled upon a thread about this here: https://support.searchandfilter.com/forums/search/Masonry/
It looks like all that needs to happen to make this work is to force Masonry to reload once the Search and Filter AJAX is done. The article I posted mentions some ways to do that that didn’t work for me. Is there a best practice to make this work? Or even a way to force Masonry to reload once Search and Filter’s AJAX is done.
Any help and guidance is appreciated.
Thanks
-
AuthorSearch Results
Search Results for 'Masonry'
-
Search Results
-
Topic: Masonry and Search & Filter
I stumbled upon a thread about this here: https://support.searchandfilter.com/forums/search/Masonry/
It looks like all that needs to happen to make this work is to force Masonry to reload once the Search and Filter AJAX is done. The article I posted mentions some ways to do that that didn’t work for me. Is there a best practice to make this work? Or even a way to force Masonry to reload once Search and Filter’s AJAX is done.
Any help and guidance is appreciated.
Thanks