You can pass the parameter to the next page like in this line of code where ‘grade=’ is the parameter I am passing to the next page.
wixLocation.to( "/k-8-learning-resources? grade=" +$item( " #textGrade " ).text )
You will then need to use the wix-location and setFilter functions to pull the sort parameter from the URL and set the database filter based on that value.