I have infinite scroll enabled on my main articles category, but also have two other categories that use custom templates for the category page. I’m trying to disable the infinite scroll navigation link that goes to /page/2, /page/3, etc. because those pages are all identical to page 1 due to the templates being used.
Can the infinite scroll feature be filtered in some way to be active only on the articles category? I tried filtering the generate_blog_do_infinite_scroll_path function and also doing a custom function to override in my theme but neither worked. I know there is also some javascript involved so I don’t know if just removing the <div class="infinite-scroll-path">
code would result in a JS error. Also, disabling the infinite scroll does not remove the links.