Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Preserve Masonry when using facets to search posts Reply To: Preserve Masonry when using facets to search posts

#8321
Heidi
Participant

According to FacetWP help desk, masonry or other js scripts that need to reload can be done on the facetwp-loaded js hook
https://facetwp.com/documentation/developers/javascript/facetwp-loaded/

However, I have no Javascript skills. I’ve tried this, but it doesn’t work:

<script>
jQuery(document).on('facetwp-loaded', function() {
    jQuery( '.masonry-container' ).masonry( 'layout' );
});
</script>

Any better ideas? Much thanks!