Search Results for 'Masonry'

Forums › Forums › Search › Search Results for 'Masonry'

Viewing 10 results – 101 through 110 (of 354 total)
  • Author
    Search Results
  • #202390

    Trevor
    Participant

    Wherever you have the form shortcode, place the other after it, in the one block, like this, making sure there is also a script there (make sure you enter this in the Text tab of the widget):

    [searchandfilter id="8208"]
    [searchandfilter id="8208" action="filter_next_query"]
    <script>(function ( $ ) {
    	"use strict";
    	
    	// detects when the ajax request has finished and the content has been updated
    	// re-init the layout scripts from Elementor
    	$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    		elementorFrontend.hooks.doAction('frontend/element_ready/posts.classic', jQuery('.elementor-widget-posts'));
    	});
    	
    }(jQuery));</script>

    They should all be in the same text widget.

    Then, in the Posts Grid, make sure that Masonry is enabled.


    Anonymous
    Inactive

    Hi,
    I could not find a suitable answer on this so, i had to start a topic.
    I am using TwentySeventeen and Elementor Pro, but i have an issue here.
    Let me tell you some details in case i missed something from the documentation (https://searchandfilter.com/documentation/3rd-party/elementor/).

    First of all, i have added 3 rows:
    -1st row: text block [searchandfilter id="904" action="filter_next_query"]

    -2nd row: text block `<script>(function ( $ ) {
    “use strict”;

    // detects when the ajax request has finished and the content has been updated
    // re-init the layout scripts from Elementor
    $(document).on(“sf:ajaxfinish”, “.searchandfilter”, function(){
    elementorFrontend.hooks.doAction(‘frontend/element_ready/posts.classic’, jQuery(‘.elementor-widget-posts’));
    });

    }(jQuery));</script>`

    This i have found here “https://support.searchandfilter.com/forums/topic/elementor-pro-results-are-not-filtered-ajax/&#8221; and solved the mess up of the thumbnails’ height after making any choice.

    -3rd row: Here i have created two subrows in the same row, so:
    –1st subrow: text block [searchandfilter id="904"]
    –2nd subrow: “Posts” from Elementor Pro. In the “Posts” i have made no changes in “Query” and “Pagination”. Only some minor changes in the “Layout” of the “Content” and the option “Masonry” here is set to “Off” if it is of any use to you.

    To continue with, i have added:
    1)”Custom Display Method” in “Display results”
    2).elementor-widget-posts in “Ajax Container”
    3).elementor-pagination a in “Pagination Selector”
    4) http://localhost/theURL/ in “Results URL”, where “theURL” is the same as the one i have added all the mentioned above in the rows.

    The thing is…

    After making a choice, the “Posts” subrow is refreshed but nothing changes. The results are not filtered at all.

    Do i have to make any changes in the “results.php” that i have located in the folder “search-filter” in my theme’s folder, or this is only useful for the “Using a shortcode” in the “Display results method”?

    Also, i have deactivated all of my plugins, except for
    “Custom Post Type UI”
    “Elementor”
    “Elementor Pro”
    “Search & Filter Pro”

    Sorry for the huge message, but i think it might prove to be necessary.
    Thanks in advance.


    Anonymous
    Inactive

    I agree. Masonry works for my site. Really appreciate the support.


    Trevor
    Participant

    The workaround is not so easy. Masonry should not be changing the grid so much. It is still a grid system.


    Anonymous
    Inactive

    I have applied your solution to the posts and it works perfectly when applied to the masonry style. Is there also a workaround for the grid layout as well? Thank You

    #201279

    Trevor
    Participant

    I think I can see the issue. The desktop and mobiles grids are the same, but CSS makes them different. Both use the Masonry (Isotope) script to recalculate sizes etc.

    Does Beaver Themer give you the option to disable this? It looks to me like you only have one column, and Masonry will do little on just one column.

    Otherwise, you or Beaver Themer need to figure how to reload that masonry when our Ajax fires.

    Before you go to them, try disabling Ajax in our plugin. This will casue page reloads, but should not then have the issue you first described.

    This post describes generally how to reload Masonry:

    https://support.searchandfilter.com/forums/topic/reload-masonry-grid-after-ajax-call/#post-165867

    It is public, so the folks at Beaver Themer will be able to read it.


    Trevor
    Participant

    In the Post grid setup, do you have Masonry enabled? If not, can you try that? You would need this script on the page (you can put it inside the simple text editor pane – not the visual text editor pane of the widget – of a Text Widget):

    <script>(function ( $ ) {
    	"use strict";
    	
    	// detects when the ajax request has finished and the content has been updated
    	// re-init the layout scripts from Elementor
    	$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    		elementorFrontend.hooks.doAction('frontend/element_ready/posts.classic', jQuery('.elementor-widget-posts'));
    	});
    	
    }(jQuery));</script>

    It can be in the same Text widget at the shortcodes for the form and the filter_next_query action, in which case the whole thing would look like this (your ID will be different:

    [searchandfilter id="222"][searchandfilter id="222" action="filter_next_query"]<script>(function ( $ ) {
    	"use strict";
    	
    	// detects when the ajax request has finished and the content has been updated
    	// re-init the layout scripts from Elementor
    	$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    		elementorFrontend.hooks.doAction('frontend/element_ready/posts.classic', jQuery('.elementor-widget-posts'));
    	});
    	
    }(jQuery));</script>
    #200966

    Anonymous
    Inactive

    I did just add your function to [searchandfilter id="2514"]. Its not a Text Block but a HTML block, I guess that makes no difference though?

    (Masonry Option was on already)

    No Change so fare

    #200960

    Trevor
    Participant

    OK. Is the Masonry option ON in the Elementor Post Grid? It is best to be ON.

    In the text block where the [searchandfilter id="2514"] is, add also this code (in Text mode):

    <script>(function ( $ ) {
    	"use strict";
    	
    	// detects when the ajax request has finished and the content has been updated
    	// re-init the layout scripts from Elementor
    	$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    		elementorFrontend.hooks.doAction('frontend/element_ready/posts.classic', jQuery('.elementor-widget-posts'));
    	});
    	
    }(jQuery));</script>
    #200867

    Trevor
    Participant

    Great to speak with you Niels. You are going to contact the theme author to see if they can help with the script required to re-trigger Masonry after our Ajax has run.

Viewing 10 results – 101 through 110 (of 354 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.