要删除Javascript的分页,以便我们可以使用筛选器链接吗

要删除Javascript的分页,以便我们可以使用筛选器链接吗,javascript,woocommerce,pagination,Javascript,Woocommerce,Pagination,我们在页面上有这些按钮链接,我们正在使用javascript编写url。问题是这些页面有分页,我们需要一种方法来抓取主类别页面,而不是我们正在创建的url中的分页。否则会导致大量404错误。代码如下,如有任何帮助,将不胜感激 谢谢 <a onclick="return newDoc2(this)" href=""><script function newDoc2(item) { "use

我们在页面上有这些按钮链接,我们正在使用javascript编写url。问题是这些页面有分页,我们需要一种方法来抓取主类别页面,而不是我们正在创建的url中的分页。否则会导致大量404错误。代码如下,如有任何帮助,将不胜感激

谢谢

<a onclick="return newDoc2(this)" href=""><script
        function newDoc2(item) {
            "use strict";
            item.href = window.location.pathname + "/?filter_product-types=capsules/#shop";
            return true;
        }