0

I'm using GeneratePress (GP) theme. They have default infinity scrolling feature. I am using this infinity scrolling instead of pagination.

But problem is when I go to homepage or category page and type /page/2/ (for example /page/2, it can be page 100) with domain name like domain.com/page/2/ or domain.com/category/bike/page/2/ still showing the result. But I want to remove these page I mean when anybody type this /page/2/ they will see page not found notice. How can I do that??

1
  • Ideally you want to force the $paged argument to false in WP_Rewrite::generate_rewrite_rules. But I can't see a way to hook that. You could use one of the hooks in WP_Rewrite::rewrite_rules() to strip them out again.
    – Rup
    Jan 18 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.