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

#8337
Tom
Keymaster

Looks good – you don’t need to execute PHP in this case though.

Can we try this?:

<script>
    jQuery( document ).on( 'facetwp-loaded', function() {
        console.log( 'loaded!' );
        jQuery( '.wp-show-posts-masonry' ).masonry( 'layout' );
    } );
</script>

Now right click your page, click “Inspect” and go to the “Console” tab. Then load FacetWP – does the word “loaded!” appear in the console?