How do I set filters to reset automatically on new search?
To fix this I created a new block and inserted this code:
&lt;script&gt;
    //unchecks all checkboxes
    function clearCheckBoxes(){
        var uncheck=document.getElementsByTagName('input');
                    for(var i=0;i&lt;uncheck.length;i++){
                        if(uncheck[i].type=='checkbox'){
                            uncheck[i].checked=false;
                        }
                    }
    }
    //this function makes sure that new searches aren't hindered by filters set for previous searches.
    jQuery(function(){
        if(typeof(Storage) !== &quot;undefined&quot;){
            //retrieve what's in search box and remove whitespace
            var currentsearch = document.getElementById(&quot;searchbar&quot;).value;
            currentsearch = currentsearch.trim();       
            
            //if search box has a value that differs from the session storage search value then filter checkboxes are unchecked and url is sanitized of categories
            if (currentsearch.length &gt; 0){
                if (sessionStorage.getItem(&quot;squery&quot;)) {
                    let oldsearch = sessionStorage.getItem(&quot;squery&quot;);
                    if(currentsearch !== oldsearch){
                        clearCheckBoxes();
                        location.pathname = 'simplepathname';   
                    }
                }
                // set session storage search value equal to current value
                sessionStorage.setItem(&quot;squery&quot;, currentsearch);
            }
        }
    });
&lt;/script&gt;