Thanks Creedon, we don't have a "store" though, it's complicated but our website have products but they are just stand alone webpages since they are technically services. It's okay, I think I managed to manually have a solution. Also I don't know if it's good enough code but I added a code injection in header so it only applies search filters in the search page (/search - i couldnt edit it because ss has a default page for it) and i didn't put the codes in custom css. I added console log just to check to make sure it doesn't load in all the pages: Thanks 🙂
let myUrl = window.location.href;
let result = myUrl.includes("search") ? insertSearchFilter() : noSearchFilter();
function insertSearchFilter() {
// Get HTML head element
var head = document.getElementsByTagName('HEAD')[0];
// Create new link Element
var link = document.createElement('link');
// set the attributes for link element
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'https://www.YOURWEBSITEURL.com/s/search-results.css';
// Append link element to HTML head
head.appendChild(link);
console.log("IN SEARCH PAGE");
};
function noSearchFilter() { console.log("NOT IN SEARCH PAGE"); };