Exclude Last Page from Pagination

Hi folks,

I have a WooCommerce Layout that is using the Post Pagination (https://jaxengrey.com/shop/). The client doesn’t want to show the last page number — i.e., Page 39 — as it overwhelms the customers.

Is there a filter or functions.php script that can remove ‘last page’ from the pagination?

I’ve tried display: none on last-child(2) to remove — which works well on the main archive… but when we’ve got an archive with only 3 pages, it removes #2. I’ve also tried hooking into the body page-2 and page-3 to remove but I think we’ll have to chase that hack all the way up to page-6 or so…

Thanks!

Luke

Hello Luke,

Thanks for writing to us.

Regretfully there is no option for that at the moment, it would require custom development I would suggest you please contact a developer who can assist you with your concerns you can avail Elite where we do custom development. Please remember we don’t provide custom development support it is out of the support scope.

Thanks for understanding

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.