Avada – re-trigger isotope / masonry / packery grid to preserve grid

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

// Add the following into functions.php

add_action( ‘wp_footer’, function() {
?>
<script>
(function($) {
$(document).on(‘facetwp-loaded’, function() {
if (FWP.loaded) {
$grid = $(‘.fusion-blog-layout-grid’);
$grid.isotope(‘appended’, $grid.find(‘article’));
$grid.imagesLoaded(function() {
$grid.isotope(‘layout’);
});
}
});
})(jQuery);
</script>
<?php
}, 100 );

{{/gist}}