Filtering on the search results page after an advanced search

Hey there,

Just after some help. We have a search box built with relevanssi that’s working great in finding the posts we want. The url that’s generated when all the fields have values in the search box is “example.com/?s=Legal+assistance+services&from=&to=&tag=219&report_author=109&cats=50%2C52”.

On the actual results page we’d love to have filters in a dropdown, specifically Tags and Authors. However, when selecting one of these the parameter gets added on the url and doesn’t actually replace the previous selection.

For example:

Let’s say the report author is 109 is John then they select report author 110 which is Sally after they’ve done a search, we’d like the report_author value to get replaced.
This “example.com/?s=Legal+assistance+services&from=&to=&tag=219&report_author=109&cats=50%2C52″ to this”example.com/?s=Legal+assistance+services&from=&to=&tag=219&report_author=110&cats=50%2C52”

What’s the best way to do this?

Thank you very much

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer