Created
December 28, 2020 15:45
-
-
Save mgibbs189/314f2346855e0c47d6d621802918f029 to your computer and use it in GitHub Desktop.
FacetWP - trigger Envira Gallery on ajax refresh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add to your (child) theme's functions.php | |
add_action( 'wp_head', function() { | |
?> | |
<script> | |
(function($) { | |
$(document).on('facetwp-loaded', function() { | |
$(document).trigger('envira_load'); | |
}); | |
})(jQuery); | |
</script> | |
<?php | |
}, 100 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment