Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Created November 18, 2019 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgibbs189/2a99a0f1324b1c59dcec91813a343d52 to your computer and use it in GitHub Desktop.
Save mgibbs189/2a99a0f1324b1c59dcec91813a343d52 to your computer and use it in GitHub Desktop.
FacetWP - turn off URL hash functionality
<?php
// Add to your (child) theme's functions.php file
add_action( 'wp_head', function() {
?>
<script>
(function($) {
$(document).on('facetwp-refresh', function() {
if (! FWP.loaded) {
FWP.set_hash = function() { /* empty */ }
}
});
})(jQuery);
</script>
<?php
}, 100 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment