How to add pagination to custom page

You can follow below URl to find your solution

How to fix pagination for custom loops?