Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save adrianosferreira/ef241688433c37b74618 to your computer and use it in GitHub Desktop.
Save adrianosferreira/ef241688433c37b74618 to your computer and use it in GitHub Desktop.
Clear the first pagination page once parametric search is triggered
/*
* This will set the historyP to 1 in the View ID 25. So when you filter something in the parametric search
* it will work just fine
*
* Used here: https://wp-types.com/forums/topic/pagination-scroll-transition-direction-is-incorrect/#post-374741
*/
jQuery( document ).on( 'js_event_wpv_parametric_search_triggered', function( event, data ) {
WPViews.view_pagination.historyP[25] = 1;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment