HEX
Server: Apache
System: Linux p3plzcpnl476737.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: p8pyefaexf70 (9161224)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/p8pyefaexf70/www/wp-content/uploads/custom-css-js/4647.js
<!-- start Simple Custom CSS and JS -->
<script type="text/javascript">
/* Default comment here */ 

document.addEventListener("DOMContentLoaded", function () {
  const categoryLinks = document.querySelectorAll('a[href*="/product-category/"]');

  categoryLinks.forEach(link => {
    const href = link.getAttribute("href");
    const match = href.match(/\/product-category\/([^\/?#]+)/);
    
    if (match) {
      const slug = match[1];
      const currentURL = window.location.pathname;

      // Replace link with query param format
      link.setAttribute("href", `${currentURL}?category=${slug}`);
    }
  });
});


</script>
<!-- end Simple Custom CSS and JS -->