Home › Forums › Pro Support › Preserve Masonry when using facets to search posts › Reply To: Preserve Masonry when using facets to search posts
March 23, 2019 at 5:14 pm
#8337
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?