-
-
Save machouinard/f939e441fd8903fd70ba34c757ef213b to your computer and use it in GitHub Desktop.
FacetWP - intercept Genesis pagination
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
(function($) { | |
$(document).on('click', '.pagination a', function(e) { | |
e.preventDefault(); | |
var matches = $(this).attr('href').match(/\/page\/(\d+)/); | |
if (null != matches) { | |
FWP.paged = parseInt(matches[1]); | |
} | |
FWP.soft_refresh = true; | |
FWP.refresh(); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment