Clear or reset the wordpress posts pagination while changing filters
It has been anwsered here:https://wordpress.stackexchange.com/a/264266
function get_nopaging_url() { $current_url = $_SERVER[REQUEST_URI]; $pattern = '/page\\/[0-9]+\\//i'; $nopaging_url = preg_replace($pattern, '', $current_url); return $nopaging_url;}
You could use this function to remove the pagination in your urls with filters.
See example:
<a href="<?php echo get_nopaging_url(); ?>?filter=houses">