facetwp uncode isotope

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php

/**
** reload isotope for uncode theme after facet refresh
**/
add_action( ‘wp_head’, function() { ?>

<script>
(function($) {
$(document).on(‘facetwp-loaded’, function() {
if (FWP.loaded) {
UNCODE.isotopeLayout();
}
});
})(jQuery);
</script>

<?php } );
{{/gist}}