-
AuthorSearch Results
-
December 25, 2016 at 9:24 am #78635
In 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_args
you 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
December 19, 2016 at 10:54 am #77525In reply to: How display Result page as Grid ?
TrevorParticipantOK, I can see your site uses Masonry. It seems to load the script on all pages, so that should make it easier.
It uses this command to initialize masonry on the page:
hb_masonry();
So if we need to, we can hook into that. Otherwise it looks like all we need to do is add some code to the results.php file.
Where are you located? NYC? Do you have Skype, in which case we can do this together over skype share screen?
December 18, 2016 at 5:17 pm #77404In reply to: How display Result page as Grid ?
TrevorParticipantDo you have an example of a three grid page in your theme? The only one I could find uses masonry, which is hard to do. Doesn’t your theme come with Visual Composer also?
-
AuthorSearch Results
-
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