Hello, I have a problem with my page. I’m using 3-rd party searching tool, so I have only one page in my shop which i like. However while someone search for category I want to display more information about it. My searching tool adds slug to URL for example “_cat_category1” and it is the only diffrent between categories.
I want to add div with difrent conntent depending of this slug. I’ve tried using JS like that:
Holder
<script>
displayContent();
function displayContent(){
var d = document.getElementById("catContent");
if(window.location.href.include('_cat_category1'))
d.innerHTML = window.location.href;
}
</script>
But it does not work. Could You help me?