Enfold – trigger lightbox code after refresh

mgibbs189

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

function fwp_trigger_lightbox() {
?>
<script>
(function($) {
$(document).on(‘facetwp-loaded’, function() {
$(‘body’).avia_activate_lightbox();
});
})(jQuery);
</script>
<?php
}
add_action( ‘wp_head’, ‘fwp_trigger_lightbox’, 50 );
{{/gist}}