Hide template if no selections

mgibbs189

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

// Add the code below

add_action( ‘wp_head’, function() {
?>
<script>
(function($) {
$(document).on(‘facetwp-loaded’, function() {
if (FWP.loaded || ” != FWP.build_query_string()) {
$(‘.facetwp-template’).show();
}
});
})(jQuery);
</script>
<?php
}, 100 );
{{/gist}}