Listify – trigger Salvattore grid

mgibbs189

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

// Add the following to your child theme’s functions.php

add_action( ‘wp_head’, function() {
?>
<script>
(function($) {
$(document).on(‘facetwp-loaded’, function() {
if (‘undefined’ !== typeof FWP && FWP.loaded && 0 < $(‘.content-shop-wrapper’).length) {
var grid = document.querySelector(‘.content-shop-wrapper’);
salvattore.registerGrid(grid);
}
});
})(jQuery);
</script>
<?php
}, 100 );

{{/gist}}