FacetWP – get hash clicks working

<?php

// Add the following to your (child) theme's functions.php

add_action( 'wp_footer', function() {
?>

<script>
(function($) {
  $(document).on('click', 'a[href^="#"]', function() {
    var css_id = $(this).attr('href');
    var $el = $(css_id);
    if (0 < $el.length) {
      window.scrollTo(0, $el.offset().top);
    }
  });
})(jQuery);
</script>

<?php
}, 100 );